mfance-shark-v1 1.0.26 → 1.0.28

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.
@@ -0,0 +1,9 @@
1
+ import { AuditableEntity } from '../../auditable/auditable.entity';
2
+ export declare class Audit extends AuditableEntity {
3
+ action: string;
4
+ data: Record<string, any>;
5
+ oldData: Record<string, any>;
6
+ newData: Record<string, any>;
7
+ ipAddress: string;
8
+ userId: string;
9
+ }
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.Audit = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const auditable_entity_1 = require("../../auditable/auditable.entity");
15
+ const table_names_constant_1 = require("../utils/constants/table-names.constant");
16
+ let Audit = class Audit extends auditable_entity_1.AuditableEntity {
17
+ };
18
+ exports.Audit = Audit;
19
+ __decorate([
20
+ (0, typeorm_1.Column)({
21
+ type: 'varchar',
22
+ nullable: true,
23
+ }),
24
+ __metadata("design:type", String)
25
+ ], Audit.prototype, "action", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({
28
+ type: 'jsonb',
29
+ nullable: true,
30
+ }),
31
+ __metadata("design:type", Object)
32
+ ], Audit.prototype, "data", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({
35
+ type: 'jsonb',
36
+ nullable: true,
37
+ }),
38
+ __metadata("design:type", Object)
39
+ ], Audit.prototype, "oldData", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({
42
+ type: 'jsonb',
43
+ nullable: true,
44
+ }),
45
+ __metadata("design:type", Object)
46
+ ], Audit.prototype, "newData", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({
49
+ type: 'varchar',
50
+ nullable: true,
51
+ }),
52
+ __metadata("design:type", String)
53
+ ], Audit.prototype, "ipAddress", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({
56
+ type: 'varchar',
57
+ nullable: true,
58
+ }),
59
+ __metadata("design:type", String)
60
+ ], Audit.prototype, "userId", void 0);
61
+ exports.Audit = Audit = __decorate([
62
+ (0, typeorm_1.Entity)(table_names_constant_1.TABLE_NAMES.AUDIT)
63
+ ], Audit);
64
+ //# sourceMappingURL=audit.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.entity.js","sourceRoot":"","sources":["../../../src/common/entities/audit.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAiE;AACjE,uEAAmE;AACnE,kFAAsE;AAM/D,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,kCAAe;CAsCzC,CAAA;AAtCY,sBAAK;AAMhB;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;qCACa;AAMf;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;mCACwB;AAM1B;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;sCAC2B;AAM7B;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI;KACf,CAAC;;sCAC2B;AAM7B;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;wCACgB;AAMlB;IAJC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;KACf,CAAC;;qCACa;gBApCJ,KAAK;IAJjB,IAAA,gBAAM,EACH,kCAAW,CAAC,KAAK,CACpB;GAEY,KAAK,CAsCjB"}
@@ -19,4 +19,5 @@ import { Operation } from './operation.entity';
19
19
  import { CurrencyValue } from './currencyValue.entity';
20
20
  import { Rock } from './rock.entity';
21
21
  import { Distributor } from './users/distributor.entity';
22
- export declare const entities: (typeof File | typeof Permission | typeof Role | typeof User | typeof SalePoint | typeof Country | typeof Stock | typeof Currency | typeof CaisseDailyWorker | typeof Caisse | typeof Operation | typeof StockSalePoint | typeof CurrencyValue | typeof StockPartner | typeof Rock | typeof StockStonePartner | typeof CaisseOperationType | typeof CaisseOperation | typeof SoldeCaisses | typeof SoldeCustomers | typeof Distributor)[];
22
+ import { Audit } from './audit.entity';
23
+ export declare const entities: (typeof File | typeof Permission | typeof Role | typeof User | typeof SalePoint | typeof Country | typeof Stock | typeof Currency | typeof CaisseDailyWorker | typeof Caisse | typeof Operation | typeof StockSalePoint | typeof CurrencyValue | typeof StockPartner | typeof Rock | typeof StockStonePartner | typeof CaisseOperationType | typeof CaisseOperation | typeof SoldeCaisses | typeof SoldeCustomers | typeof Distributor | typeof Audit)[];
@@ -26,6 +26,7 @@ const currencyValue_entity_1 = require("./currencyValue.entity");
26
26
  const payment_method_entity_1 = require("./payment-method.entity");
27
27
  const rock_entity_1 = require("./rock.entity");
28
28
  const distributor_entity_1 = require("./users/distributor.entity");
29
+ const audit_entity_1 = require("./audit.entity");
29
30
  exports.entities = [
30
31
  file_entity_1.File,
31
32
  user_entity_1.User,
@@ -54,5 +55,6 @@ exports.entities = [
54
55
  role_entity_1.Role,
55
56
  user_entity_1.User,
56
57
  distributor_entity_1.Distributor,
58
+ audit_entity_1.Audit,
57
59
  ];
58
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/entities/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqC;AACrC,+CAAqC;AACrC,oFAAwE;AACxE,0DAAgD;AAChD,8EAAmE;AACnE,wFAA4E;AAC5E,oEAAyD;AACzD,+CAAqC;AACrC,2DAAiD;AACjD,qDAA2C;AAC3C,2DAAgD;AAChD,uDAA6C;AAC7C,sEAA4D;AAC5D,0EAAgE;AAChE,4EAAkE;AAClE,iDAAuC;AACvC,iEAAsD;AACtD,uEAA2D;AAC3D,6EAAiE;AACjE,6DAAmD;AACnD,yDAA+C;AAC/C,iEAAuD;AACvD,mEAAwD;AACxD,+CAAqC;AACrC,mEAAyD;AAI5C,QAAA,QAAQ,GAAG;IACpB,kBAAI;IACJ,kBAAI;IACJ,8CAAiB;IACjB,sBAAM;IACN,yCAAe;IACf,kDAAmB;IACnB,+BAAU;IACV,kBAAI;IACJ,8BAAU;IACV,wBAAO;IACP,6BAAS;IACT,0BAAQ;IACR,kCAAY;IACZ,sCAAc;IACd,wCAAe;IACf,oBAAK;IACL,mCAAY;IACZ,wCAAc;IACd,8CAAiB;IACjB,gCAAW;IACX,4BAAS;IACT,oCAAa;IACb,qCAAa;IACb,kBAAI;IACJ,kBAAI;IACJ,kBAAI;IACJ,gCAAW;CAGd,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/entities/index.ts"],"names":[],"mappings":";;;AAAA,+CAAqC;AACrC,+CAAqC;AACrC,oFAAwE;AACxE,0DAAgD;AAChD,8EAAmE;AACnE,wFAA4E;AAC5E,oEAAyD;AACzD,+CAAqC;AACrC,2DAAiD;AACjD,qDAA2C;AAC3C,2DAAgD;AAChD,uDAA6C;AAC7C,sEAA4D;AAC5D,0EAAgE;AAChE,4EAAkE;AAClE,iDAAuC;AACvC,iEAAsD;AACtD,uEAA2D;AAC3D,6EAAiE;AACjE,6DAAmD;AACnD,yDAA+C;AAC/C,iEAAuD;AACvD,mEAAwD;AACxD,+CAAqC;AACrC,mEAAyD;AACzD,iDAAuC;AAK1B,QAAA,QAAQ,GAAG;IACpB,kBAAI;IACJ,kBAAI;IACJ,8CAAiB;IACjB,sBAAM;IACN,yCAAe;IACf,kDAAmB;IACnB,+BAAU;IACV,kBAAI;IACJ,8BAAU;IACV,wBAAO;IACP,6BAAS;IACT,0BAAQ;IACR,kCAAY;IACZ,sCAAc;IACd,wCAAe;IACf,oBAAK;IACL,mCAAY;IACZ,wCAAc;IACd,8CAAiB;IACjB,gCAAW;IACX,4BAAS;IACT,oCAAa;IACb,qCAAa;IACb,kBAAI;IACJ,kBAAI;IACJ,kBAAI;IACJ,gCAAW;IACX,oBAAK;CAGR,CAAC"}
@@ -26,4 +26,5 @@ export declare const TABLE_NAMES: {
26
26
  DISTRIBUTOR: string;
27
27
  RECHARGEMENT_DIST_REQUEST: string;
28
28
  SOLDE_DIST: string;
29
+ AUDIT: string;
29
30
  };
@@ -29,5 +29,6 @@ exports.TABLE_NAMES = {
29
29
  DISTRIBUTOR: 'distributors',
30
30
  RECHARGEMENT_DIST_REQUEST: 'rechargement_dist_requests',
31
31
  SOLDE_DIST: 'solde_dist',
32
+ AUDIT: 'audits',
32
33
  };
33
34
  //# sourceMappingURL=table-names.constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-names.constant.js","sourceRoot":"","sources":["../../../../src/common/utils/constants/table-names.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,kBAAkB;IAC/B,gBAAgB,EAAE,uBAAuB;IACzC,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,qBAAqB;IACpC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,eAAe;IAC7B,cAAc,EAAE,iBAAiB;IACjC,SAAS,EAAE,kBAAkB;IAC7B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,OAAO;IACd,mBAAmB,EAAE,qBAAqB;IAC1C,cAAc,EAAE,iBAAiB;IACjC,WAAW,EAAE,cAAc;IAC3B,yBAAyB,EAAE,4BAA4B;IACvD,UAAU,EAAG,YAAY;CAC1B,CAAC"}
1
+ {"version":3,"file":"table-names.constant.js","sourceRoot":"","sources":["../../../../src/common/utils/constants/table-names.constant.ts"],"names":[],"mappings":";;;AAAa,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,kBAAkB;IAC/B,gBAAgB,EAAE,uBAAuB;IACzC,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,qBAAqB;IACpC,IAAI,EAAE,OAAO;IACb,UAAU,EAAE,aAAa;IACzB,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,eAAe;IAC7B,cAAc,EAAE,iBAAiB;IACjC,SAAS,EAAE,kBAAkB;IAC7B,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,YAAY;IACtB,KAAK,EAAE,QAAQ;IACf,WAAW,EAAE,cAAc;IAC3B,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,eAAe;IAC7B,gBAAgB,EAAE,mBAAmB;IACrC,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,OAAO;IACd,mBAAmB,EAAE,qBAAqB;IAC1C,cAAc,EAAE,iBAAiB;IACjC,WAAW,EAAE,cAAc;IAC3B,yBAAyB,EAAE,4BAA4B;IACvD,UAAU,EAAG,YAAY;IACzB,KAAK,EAAE,QAAQ;CAChB,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare class CreateAuditDto {
2
+ action: string;
3
+ data: Record<string, any>;
4
+ oldData: Record<string, any>;
5
+ newData: Record<string, any>;
6
+ ipAddress: string;
7
+ userId: string;
8
+ }
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ 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;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.CreateAuditDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateAuditDto {
15
+ }
16
+ exports.CreateAuditDto = CreateAuditDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", String)
21
+ ], CreateAuditDto.prototype, "action", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsObject)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", Object)
26
+ ], CreateAuditDto.prototype, "data", void 0);
27
+ __decorate([
28
+ (0, class_validator_1.IsObject)(),
29
+ (0, class_validator_1.IsOptional)(),
30
+ __metadata("design:type", Object)
31
+ ], CreateAuditDto.prototype, "oldData", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsObject)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", Object)
36
+ ], CreateAuditDto.prototype, "newData", void 0);
37
+ __decorate([
38
+ (0, class_validator_1.IsString)(),
39
+ (0, class_validator_1.IsOptional)(),
40
+ __metadata("design:type", String)
41
+ ], CreateAuditDto.prototype, "ipAddress", void 0);
42
+ __decorate([
43
+ (0, class_validator_1.IsString)(),
44
+ (0, class_validator_1.IsOptional)(),
45
+ __metadata("design:type", String)
46
+ ], CreateAuditDto.prototype, "userId", void 0);
47
+ //# sourceMappingURL=create-audit.dto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-audit.dto.js","sourceRoot":"","sources":["../../../src/dto/audit/create-audit.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAA6E;AAE7E,MAAa,cAAc;CAwB1B;AAxBD,wCAwBC;AArBC;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACE;AAIf;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;4CACa;AAI1B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACgB;AAI7B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;+CACgB;AAI7B;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;iDACK;AAIlB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;8CACE"}