@silexpert/core 1.3.195-9 → 1.3.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/resources.d.ts +0 -2
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +0 -2
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/index.d.ts +0 -4
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +0 -4
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/prestation.d.ts.map +1 -1
- package/dist/cjs/utils/prestation.js +0 -1
- package/dist/cjs/utils/prestation.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +0 -2
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +0 -2
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/index.d.ts +0 -4
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +0 -4
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/prestation.d.ts.map +1 -1
- package/dist/mjs/utils/prestation.js +0 -1
- package/dist/mjs/utils/prestation.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources.ts +0 -2
- package/ts/types/index.ts +0 -5
- package/ts/utils/prestation.ts +0 -1
- package/dist/cjs/api/resources/UsersHistory.d.ts +0 -11
- package/dist/cjs/api/resources/UsersHistory.d.ts.map +0 -1
- package/dist/cjs/api/resources/UsersHistory.js +0 -26
- package/dist/cjs/api/resources/UsersHistory.js.map +0 -1
- package/dist/cjs/types/Enum/UsersHistory.d.ts +0 -16
- package/dist/cjs/types/Enum/UsersHistory.d.ts.map +0 -1
- package/dist/cjs/types/Enum/UsersHistory.js +0 -38
- package/dist/cjs/types/Enum/UsersHistory.js.map +0 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.js +0 -41
- package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +0 -1
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +0 -7
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
- package/dist/cjs/types/Interface/api/usersHistory/Update.js +0 -31
- package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +0 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +0 -14
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.js +0 -3
- package/dist/cjs/types/Interface/models/IUsersHistory.js.map +0 -1
- package/dist/mjs/api/resources/UsersHistory.d.ts +0 -11
- package/dist/mjs/api/resources/UsersHistory.d.ts.map +0 -1
- package/dist/mjs/api/resources/UsersHistory.js +0 -28
- package/dist/mjs/api/resources/UsersHistory.js.map +0 -1
- package/dist/mjs/types/Enum/UsersHistory.d.ts +0 -16
- package/dist/mjs/types/Enum/UsersHistory.d.ts.map +0 -1
- package/dist/mjs/types/Enum/UsersHistory.js +0 -35
- package/dist/mjs/types/Enum/UsersHistory.js.map +0 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +0 -9
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.js +0 -41
- package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +0 -1
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +0 -7
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +0 -1
- package/dist/mjs/types/Interface/api/usersHistory/Update.js +0 -29
- package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +0 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +0 -14
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +0 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.js +0 -2
- package/dist/mjs/types/Interface/models/IUsersHistory.js.map +0 -1
- package/ts/api/resources/UsersHistory.ts +0 -35
- package/ts/types/Enum/UsersHistory.ts +0 -38
- package/ts/types/Interface/api/usersHistory/Create.ts +0 -24
- package/ts/types/Interface/api/usersHistory/Update.ts +0 -17
- package/ts/types/Interface/models/IUsersHistory.ts +0 -17
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Resource } from '../Resource';
|
|
2
|
-
export class UsersHistory extends Resource {
|
|
3
|
-
createUserHistory(body) {
|
|
4
|
-
return this.axios.$post('usersHistory', body);
|
|
5
|
-
}
|
|
6
|
-
getAllUserHistory(signal) {
|
|
7
|
-
return this.axios.$get('usersHistory', {
|
|
8
|
-
...signal && { signal }
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
getUserHistoryById(id, signal) {
|
|
12
|
-
return this.axios.$get(`usersHistory/${id}`, {
|
|
13
|
-
...signal && { signal }
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
getUserHistoryByUserID(id, signal) {
|
|
17
|
-
return this.axios.$get(`usersHistory/user/${id}`, {
|
|
18
|
-
...signal && { signal }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
updateUserHistory(id, body) {
|
|
22
|
-
return this.axios.$put(`usersHistory/${id}`, body);
|
|
23
|
-
}
|
|
24
|
-
deleteUserHistory(id) {
|
|
25
|
-
return this.axios.$delete(`usersHistory/${id}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=UsersHistory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.js","sourceRoot":"","sources":["../../../../ts/api/resources/UsersHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,OAAO,YAAa,SAAQ,QAAQ;IACxC,iBAAiB,CAAC,IAAwB;QACxC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;IAChD,CAAC;IAED,iBAAiB,CAAC,MAAoB;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,EAAE;YACrC,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAED,kBAAkB,CAAC,EAAU,EAAE,MAAoB;QACjD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,EAAE;YAC3C,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAED,sBAAsB,CAAC,EAAU,EAAE,MAAoB;QACrD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAE,EAAE;YAChD,GAAG,MAAM,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC,CAAC;IACL,CAAC;IAED,iBAAiB,CAAC,EAAU,EAAE,IAAwB;QACpD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACrD,CAAC;IAED,iBAAiB,CAAC,EAAU;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAClD,CAAC;CAEF","sourcesContent":["import { Resource } from '../Resource';\nimport { IUsersHistory, CreateUsersHistory, UpdateUsersHistory } from '../../types';\n\nexport class UsersHistory extends Resource {\n createUserHistory(body: CreateUsersHistory): Promise<IUsersHistory> {\n return this.axios.$post('usersHistory', body);\n }\n\n getAllUserHistory(signal?: AbortSignal): Promise<IUsersHistory[]> {\n return this.axios.$get('usersHistory', {\n ...signal && { signal }\n });\n }\n\n getUserHistoryById(id: number, signal?: AbortSignal): Promise<IUsersHistory> {\n return this.axios.$get(`usersHistory/${id}`, {\n ...signal && { signal }\n });\n }\n\n getUserHistoryByUserID(id: number, signal?: AbortSignal): Promise<IUsersHistory[]> {\n return this.axios.$get(`usersHistory/user/${id}`, {\n ...signal && { signal }\n });\n }\n\n updateUserHistory(id: number, body: UpdateUsersHistory): Promise<IUsersHistory> {\n return this.axios.$put(`usersHistory/${id}`, body);\n }\n\n deleteUserHistory(id: number): Promise<number> {\n return this.axios.$delete(`usersHistory/${id}`);\n }\n\n}"]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum TypeUserHistory {
|
|
2
|
-
CREATE = 1,
|
|
3
|
-
UPDATE = 2,
|
|
4
|
-
DELETE = 3,
|
|
5
|
-
RESTORE = 4,
|
|
6
|
-
INFO_UPDATE = 5,// Info ok
|
|
7
|
-
ROLE_UPDATE = 6,// Role ok
|
|
8
|
-
PASSWORD_UPDATE = 7,
|
|
9
|
-
EQUIPMENT_ASSIGN = 8,
|
|
10
|
-
EQUIPMENT_BROKEN = 9,
|
|
11
|
-
EQUIPMENT_RETURN = 10,
|
|
12
|
-
EQUIPMENT_LOST = 11,
|
|
13
|
-
MAIL_SENT_TO_TS = 12
|
|
14
|
-
}
|
|
15
|
-
export declare const TypeUserHistoryLabels: Record<TypeUserHistory, string>;
|
|
16
|
-
//# sourceMappingURL=UsersHistory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.d.ts","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IAEzB,MAAM,IAAI;IACV,MAAM,IAAI;IACV,MAAM,IAAI;IACV,OAAO,IAAI;IAGX,WAAW,IAAI,CAAE,UAAU;IAC3B,WAAW,IAAI,CAAE,UAAU;IAG3B,eAAe,IAAI;IAGnB,gBAAgB,IAAI;IACpB,gBAAgB,IAAI;IACpB,gBAAgB,KAAK;IACrB,cAAc,KAAK;IAGnB,eAAe,KAAK;CACrB;AAED,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAajE,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export var TypeUserHistory;
|
|
2
|
-
(function (TypeUserHistory) {
|
|
3
|
-
// Cycle de vie Compte
|
|
4
|
-
TypeUserHistory[TypeUserHistory["CREATE"] = 1] = "CREATE";
|
|
5
|
-
TypeUserHistory[TypeUserHistory["UPDATE"] = 2] = "UPDATE";
|
|
6
|
-
TypeUserHistory[TypeUserHistory["DELETE"] = 3] = "DELETE";
|
|
7
|
-
TypeUserHistory[TypeUserHistory["RESTORE"] = 4] = "RESTORE";
|
|
8
|
-
// Validation & Modifications Spécifiques
|
|
9
|
-
TypeUserHistory[TypeUserHistory["INFO_UPDATE"] = 5] = "INFO_UPDATE";
|
|
10
|
-
TypeUserHistory[TypeUserHistory["ROLE_UPDATE"] = 6] = "ROLE_UPDATE";
|
|
11
|
-
// Sécurité
|
|
12
|
-
TypeUserHistory[TypeUserHistory["PASSWORD_UPDATE"] = 7] = "PASSWORD_UPDATE";
|
|
13
|
-
// Gestion Matériel
|
|
14
|
-
TypeUserHistory[TypeUserHistory["EQUIPMENT_ASSIGN"] = 8] = "EQUIPMENT_ASSIGN";
|
|
15
|
-
TypeUserHistory[TypeUserHistory["EQUIPMENT_BROKEN"] = 9] = "EQUIPMENT_BROKEN";
|
|
16
|
-
TypeUserHistory[TypeUserHistory["EQUIPMENT_RETURN"] = 10] = "EQUIPMENT_RETURN";
|
|
17
|
-
TypeUserHistory[TypeUserHistory["EQUIPMENT_LOST"] = 11] = "EQUIPMENT_LOST";
|
|
18
|
-
// Communication
|
|
19
|
-
TypeUserHistory[TypeUserHistory["MAIL_SENT_TO_TS"] = 12] = "MAIL_SENT_TO_TS";
|
|
20
|
-
})(TypeUserHistory || (TypeUserHistory = {}));
|
|
21
|
-
export const TypeUserHistoryLabels = {
|
|
22
|
-
[TypeUserHistory.CREATE]: 'Création',
|
|
23
|
-
[TypeUserHistory.UPDATE]: 'Mise à jour',
|
|
24
|
-
[TypeUserHistory.DELETE]: 'Suppression',
|
|
25
|
-
[TypeUserHistory.RESTORE]: 'Restauration',
|
|
26
|
-
[TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',
|
|
27
|
-
[TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',
|
|
28
|
-
[TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',
|
|
29
|
-
[TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',
|
|
30
|
-
[TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',
|
|
31
|
-
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
32
|
-
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
33
|
-
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
34
|
-
};
|
|
35
|
-
//# sourceMappingURL=UsersHistory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UsersHistory.js","sourceRoot":"","sources":["../../../../ts/types/Enum/UsersHistory.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAsBX;AAtBD,WAAY,eAAe;IACzB,sBAAsB;IACtB,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,yDAAU,CAAA;IACV,2DAAW,CAAA;IAEX,yCAAyC;IACzC,mEAAe,CAAA;IACf,mEAAe,CAAA;IAEf,WAAW;IACX,2EAAmB,CAAA;IAEnB,mBAAmB;IACnB,6EAAoB,CAAA;IACpB,6EAAoB,CAAA;IACpB,8EAAqB,CAAA;IACrB,0EAAmB,CAAA;IAEnB,gBAAgB;IAChB,4EAAoB,CAAA;AACtB,CAAC,EAtBW,eAAe,KAAf,eAAe,QAsB1B;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAoC;IACpE,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,UAAU;IACpC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,aAAa;IACvC,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,aAAa;IACvC,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,cAAc;IACzC,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,kBAAkB;IACjD,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,kBAAkB;IACjD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,yBAAyB;IAC5D,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,sBAAsB;IAC1D,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,gBAAgB;IACpD,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAAE,iBAAiB;IACrD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,gBAAgB;IAClD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,kBAAkB;CACtD,CAAC","sourcesContent":["export enum TypeUserHistory {\n // Cycle de vie Compte\n CREATE = 1,\n UPDATE = 2,\n DELETE = 3,\n RESTORE = 4,\n\n // Validation & Modifications Spécifiques\n INFO_UPDATE = 5, // Info ok\n ROLE_UPDATE = 6, // Role ok\n\n // Sécurité\n PASSWORD_UPDATE = 7,\n\n // Gestion Matériel\n EQUIPMENT_ASSIGN = 8,\n EQUIPMENT_BROKEN = 9,\n EQUIPMENT_RETURN = 10,\n EQUIPMENT_LOST = 11,\n\n // Communication\n MAIL_SENT_TO_TS = 12, // Mail envoyé à TS\n}\n\nexport const TypeUserHistoryLabels: Record<TypeUserHistory, string> = {\n [TypeUserHistory.CREATE]: 'Création',\n [TypeUserHistory.UPDATE]: 'Mise à jour',\n [TypeUserHistory.DELETE]: 'Suppression',\n [TypeUserHistory.RESTORE]: 'Restauration',\n [TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',\n [TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',\n [TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',\n [TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',\n [TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',\n [TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',\n [TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',\n [TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',\n};\n"]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
2
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
3
|
-
export declare class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt'> {
|
|
4
|
-
idUser: number;
|
|
5
|
-
idAuthor?: number;
|
|
6
|
-
comment?: string;
|
|
7
|
-
actionType: TypeUserHistory;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=Create.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,qBAAa,kBAAmB,YAAW,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC;IAG9F,MAAM,EAAE,MAAM,CAAC;IAKf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAKlB,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,UAAU,EAAE,eAAe,CAAC;CAC7B"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
|
11
|
-
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
12
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
13
|
-
export class CreateUsersHistory {
|
|
14
|
-
idUser;
|
|
15
|
-
idAuthor;
|
|
16
|
-
comment;
|
|
17
|
-
actionType;
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
ApiProperty(),
|
|
21
|
-
IsInt(),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], CreateUsersHistory.prototype, "idUser", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
ApiPropertyOptional(),
|
|
26
|
-
IsOptional(),
|
|
27
|
-
IsInt(),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], CreateUsersHistory.prototype, "idAuthor", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
ApiPropertyOptional(),
|
|
32
|
-
IsOptional(),
|
|
33
|
-
IsString(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], CreateUsersHistory.prototype, "comment", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
ApiProperty(),
|
|
38
|
-
IsEnum(TypeUserHistory),
|
|
39
|
-
__metadata("design:type", Number)
|
|
40
|
-
], CreateUsersHistory.prototype, "actionType", void 0);
|
|
41
|
-
//# sourceMappingURL=Create.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAG7D,MAAM,OAAO,kBAAkB;IAG7B,MAAM,CAAS;IAKf,QAAQ,CAAU;IAKlB,OAAO,CAAU;IAIjB,UAAU,CAAkB;CAC7B;AAfC;IAFC,WAAW,EAAE;IACb,KAAK,EAAE;;kDACO;AAKf;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,KAAK,EAAE;;oDACU;AAKlB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;mDACM;AAIjB;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,eAAe,CAAC;;sDACI","sourcesContent":["import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\nimport { TypeUserHistory } from '../../../Enum/UsersHistory';\nimport { IUsersHistory } from '../../models/IUsersHistory';\n\nexport class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt'> {\n @ApiProperty()\n @IsInt()\n idUser: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsInt()\n idAuthor?: number;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiProperty()\n @IsEnum(TypeUserHistory)\n actionType: TypeUserHistory;\n}"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
2
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
3
|
-
export declare class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idUserAuthor'>> {
|
|
4
|
-
comment?: string;
|
|
5
|
-
actionType?: TypeUserHistory;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=Update.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,qBAAa,kBAAmB,YAAW,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,GAAG,QAAQ,GAAG,cAAc,CAAC,CAAC;IAIvG,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,UAAU,CAAC,EAAE,eAAe,CAAC;CAC9B"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
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;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
11
|
-
import { ApiPropertyOptional } from '../../../../utils/decorators';
|
|
12
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
13
|
-
export class UpdateUsersHistory {
|
|
14
|
-
comment;
|
|
15
|
-
actionType;
|
|
16
|
-
}
|
|
17
|
-
__decorate([
|
|
18
|
-
ApiPropertyOptional(),
|
|
19
|
-
IsOptional(),
|
|
20
|
-
IsString(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], UpdateUsersHistory.prototype, "comment", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
ApiPropertyOptional(),
|
|
25
|
-
IsOptional(),
|
|
26
|
-
IsEnum(TypeUserHistory),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], UpdateUsersHistory.prototype, "actionType", void 0);
|
|
29
|
-
//# sourceMappingURL=Update.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../../ts/types/Interface/api/usersHistory/Update.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAI7D,MAAM,OAAO,kBAAkB;IAI7B,OAAO,CAAU;IAKjB,UAAU,CAAmB;CAC9B;AANC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;mDACM;AAKjB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,MAAM,CAAC,eAAe,CAAC;;sDACK","sourcesContent":["import { IsEnum, IsOptional, IsString } from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils/decorators';\nimport { TypeUserHistory } from '../../../Enum/UsersHistory';\nimport { IUsersHistory } from '../../models/IUsersHistory';\n\n\nexport class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idUserAuthor'>> {\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n comment?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsEnum(TypeUserHistory)\n actionType?: TypeUserHistory;\n}"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { IUser } from './IUser';
|
|
2
|
-
import { TypeUserHistory } from '../../Enum/UsersHistory';
|
|
3
|
-
export interface IUsersHistory {
|
|
4
|
-
id?: number;
|
|
5
|
-
idUser: number;
|
|
6
|
-
idAuthor?: number | null;
|
|
7
|
-
comment?: string | null;
|
|
8
|
-
actionType: TypeUserHistory;
|
|
9
|
-
createdAt?: Date | null;
|
|
10
|
-
updatedAt?: Date | null;
|
|
11
|
-
user?: IUser;
|
|
12
|
-
author?: IUser;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=IUsersHistory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUsersHistory.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,eAAe,CAAC;IAC5B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAIxB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUsersHistory.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IUsersHistory.ts"],"names":[],"mappings":"","sourcesContent":["import { IUser } from './IUser';\nimport { TypeUserHistory } from '../../Enum/UsersHistory';\n\nexport interface IUsersHistory {\n id?: number;\n idUser: number;\n idAuthor?: number | null;\n comment?: string | null;\n actionType: TypeUserHistory;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n\n // Relations\n user?: IUser;\n author?: IUser;\n}\n"]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Resource } from '../Resource';
|
|
2
|
-
import { IUsersHistory, CreateUsersHistory, UpdateUsersHistory } from '../../types';
|
|
3
|
-
|
|
4
|
-
export class UsersHistory extends Resource {
|
|
5
|
-
createUserHistory(body: CreateUsersHistory): Promise<IUsersHistory> {
|
|
6
|
-
return this.axios.$post('usersHistory', body);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
getAllUserHistory(signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
10
|
-
return this.axios.$get('usersHistory', {
|
|
11
|
-
...signal && { signal }
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
getUserHistoryById(id: number, signal?: AbortSignal): Promise<IUsersHistory> {
|
|
16
|
-
return this.axios.$get(`usersHistory/${id}`, {
|
|
17
|
-
...signal && { signal }
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
getUserHistoryByUserID(id: number, signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
22
|
-
return this.axios.$get(`usersHistory/user/${id}`, {
|
|
23
|
-
...signal && { signal }
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
updateUserHistory(id: number, body: UpdateUsersHistory): Promise<IUsersHistory> {
|
|
28
|
-
return this.axios.$put(`usersHistory/${id}`, body);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
deleteUserHistory(id: number): Promise<number> {
|
|
32
|
-
return this.axios.$delete(`usersHistory/${id}`);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export enum TypeUserHistory {
|
|
2
|
-
// Cycle de vie Compte
|
|
3
|
-
CREATE = 1,
|
|
4
|
-
UPDATE = 2,
|
|
5
|
-
DELETE = 3,
|
|
6
|
-
RESTORE = 4,
|
|
7
|
-
|
|
8
|
-
// Validation & Modifications Spécifiques
|
|
9
|
-
INFO_UPDATE = 5, // Info ok
|
|
10
|
-
ROLE_UPDATE = 6, // Role ok
|
|
11
|
-
|
|
12
|
-
// Sécurité
|
|
13
|
-
PASSWORD_UPDATE = 7,
|
|
14
|
-
|
|
15
|
-
// Gestion Matériel
|
|
16
|
-
EQUIPMENT_ASSIGN = 8,
|
|
17
|
-
EQUIPMENT_BROKEN = 9,
|
|
18
|
-
EQUIPMENT_RETURN = 10,
|
|
19
|
-
EQUIPMENT_LOST = 11,
|
|
20
|
-
|
|
21
|
-
// Communication
|
|
22
|
-
MAIL_SENT_TO_TS = 12, // Mail envoyé à TS
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export const TypeUserHistoryLabels: Record<TypeUserHistory, string> = {
|
|
26
|
-
[TypeUserHistory.CREATE]: 'Création',
|
|
27
|
-
[TypeUserHistory.UPDATE]: 'Mise à jour',
|
|
28
|
-
[TypeUserHistory.DELETE]: 'Suppression',
|
|
29
|
-
[TypeUserHistory.RESTORE]: 'Restauration',
|
|
30
|
-
[TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',
|
|
31
|
-
[TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',
|
|
32
|
-
[TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',
|
|
33
|
-
[TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',
|
|
34
|
-
[TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',
|
|
35
|
-
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
36
|
-
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
37
|
-
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
38
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
-
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
-
|
|
6
|
-
export class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt'> {
|
|
7
|
-
@ApiProperty()
|
|
8
|
-
@IsInt()
|
|
9
|
-
idUser: number;
|
|
10
|
-
|
|
11
|
-
@ApiPropertyOptional()
|
|
12
|
-
@IsOptional()
|
|
13
|
-
@IsInt()
|
|
14
|
-
idAuthor?: number;
|
|
15
|
-
|
|
16
|
-
@ApiPropertyOptional()
|
|
17
|
-
@IsOptional()
|
|
18
|
-
@IsString()
|
|
19
|
-
comment?: string;
|
|
20
|
-
|
|
21
|
-
@ApiProperty()
|
|
22
|
-
@IsEnum(TypeUserHistory)
|
|
23
|
-
actionType: TypeUserHistory;
|
|
24
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
-
import { ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
-
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
-
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idUserAuthor'>> {
|
|
8
|
-
@ApiPropertyOptional()
|
|
9
|
-
@IsOptional()
|
|
10
|
-
@IsString()
|
|
11
|
-
comment?: string;
|
|
12
|
-
|
|
13
|
-
@ApiPropertyOptional()
|
|
14
|
-
@IsOptional()
|
|
15
|
-
@IsEnum(TypeUserHistory)
|
|
16
|
-
actionType?: TypeUserHistory;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { IUser } from './IUser';
|
|
2
|
-
import { TypeUserHistory } from '../../Enum/UsersHistory';
|
|
3
|
-
|
|
4
|
-
export interface IUsersHistory {
|
|
5
|
-
id?: number;
|
|
6
|
-
idUser: number;
|
|
7
|
-
idAuthor?: number | null;
|
|
8
|
-
comment?: string | null;
|
|
9
|
-
actionType: TypeUserHistory;
|
|
10
|
-
createdAt?: Date | null;
|
|
11
|
-
updatedAt?: Date | null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
// Relations
|
|
15
|
-
user?: IUser;
|
|
16
|
-
author?: IUser;
|
|
17
|
-
}
|