From eb86ca027691ab3a538ca722a4933888f5078f10 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Fri, 24 Nov 2023 10:19:35 +0100 Subject: [PATCH] :sparkles: Exclude sensitive data --- dist/Customer/Customer.js | 20 ++++++++++++++++++++ src/Customer/Customer.ts | 11 ++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/dist/Customer/Customer.js b/dist/Customer/Customer.js index 989f6d2..8c971ab 100644 --- a/dist/Customer/Customer.js +++ b/dist/Customer/Customer.js @@ -57,6 +57,26 @@ __decorate([ (0, class_transformer_1.Type)(() => _1.Document), __metadata("design:type", Array) ], Customer.prototype, "documents", void 0); +__decorate([ + (0, class_transformer_1.Exclude)(), + __metadata("design:type", Object) +], Customer.prototype, "smsCode", void 0); +__decorate([ + (0, class_transformer_1.Exclude)(), + __metadata("design:type", Object) +], Customer.prototype, "smsCodeExpire", void 0); +__decorate([ + (0, class_transformer_1.Exclude)(), + __metadata("design:type", Object) +], Customer.prototype, "passwordCode", void 0); +__decorate([ + (0, class_transformer_1.Exclude)(), + __metadata("design:type", Object) +], Customer.prototype, "passwordCodeExpire", void 0); +__decorate([ + (0, class_transformer_1.Exclude)(), + __metadata("design:type", Object) +], Customer.prototype, "password", void 0); exports.default = Customer; var ECustomerStatus; (function (ECustomerStatus) { diff --git a/src/Customer/Customer.ts b/src/Customer/Customer.ts index b890f2a..7604276 100644 --- a/src/Customer/Customer.ts +++ b/src/Customer/Customer.ts @@ -1,7 +1,7 @@ import { IsDate } from "class-validator"; import { Contact, Document, OfficeFolder } from "."; import Resource from "../Resource"; -import { Expose, Type } from "class-transformer"; +import { Exclude, Expose, Type } from "class-transformer"; export default class Customer extends Resource { @Expose() @@ -30,10 +30,19 @@ export default class Customer extends Resource { @Type(() => Document) public documents?: Document[]; + @Exclude() public smsCode?: string | null; + + @Exclude() public smsCodeExpire?: Date | null; + + @Exclude() public passwordCode?: string | null; + + @Exclude() public passwordCodeExpire?: Date | null; + + @Exclude() public password?: string | null; }