mfance-shark-v1 1.0.22 → 1.0.24

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,16 @@
1
+ export * from './token-type.enum';
2
+ export * from './solde-operation-type.enum';
3
+ export * from './payment-method.enum';
4
+ export * from './operation-type.enum';
5
+ export * from './email-type.enum';
6
+ export * from './caisse-type.enum';
7
+ export * from './role.enum';
8
+ export * from './transaction-status.enum';
9
+ export * from './response-message.enum';
10
+ export * from './permission.enum';
11
+ export * from './gender-type.enum';
12
+ export * from './permission-verbs.enum';
13
+ export * from './entity-type.enum';
14
+ export * from './field-name-type.enum';
15
+ export * from './caisse-ops.enum';
16
+ export * from './crud-doc.enum';
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./token-type.enum"), exports);
18
+ __exportStar(require("./solde-operation-type.enum"), exports);
19
+ __exportStar(require("./payment-method.enum"), exports);
20
+ __exportStar(require("./operation-type.enum"), exports);
21
+ __exportStar(require("./email-type.enum"), exports);
22
+ __exportStar(require("./caisse-type.enum"), exports);
23
+ __exportStar(require("./role.enum"), exports);
24
+ __exportStar(require("./transaction-status.enum"), exports);
25
+ __exportStar(require("./response-message.enum"), exports);
26
+ __exportStar(require("./permission.enum"), exports);
27
+ __exportStar(require("./gender-type.enum"), exports);
28
+ __exportStar(require("./permission-verbs.enum"), exports);
29
+ __exportStar(require("./entity-type.enum"), exports);
30
+ __exportStar(require("./field-name-type.enum"), exports);
31
+ __exportStar(require("./caisse-ops.enum"), exports);
32
+ __exportStar(require("./crud-doc.enum"), exports);
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,8DAA4C;AAC5C,wDAAsC;AACtC,wDAAsC;AACtC,oDAAkC;AAClC,qDAAmC;AACnC,8CAA4B;AAC5B,4DAA0C;AAC1C,0DAAwC;AACxC,oDAAkC;AAClC,qDAAmC;AACnC,0DAAwC;AACxC,qDAAmC;AACnC,yDAAuC;AACvC,oDAAkC;AAClC,kDAAgC"}
@@ -1,6 +1,5 @@
1
1
  export * from './role.enum';
2
2
  export * from './response-message.enum';
3
- export * from './transaction-status.enum';
4
3
  export * from './gender-type.enum';
5
4
  export * from './permission-verbs.enum';
6
5
  export * from './permission.enum';
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./role.enum"), exports);
18
18
  __exportStar(require("./response-message.enum"), exports);
19
- __exportStar(require("./transaction-status.enum"), exports);
20
19
  __exportStar(require("./gender-type.enum"), exports);
21
20
  __exportStar(require("./permission-verbs.enum"), exports);
22
21
  __exportStar(require("./permission.enum"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/utils/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,8CAA4B;AAC5B,0DAAwC;AACxC,4DAA0C;AAC1C,qDAAmC;AACnC,0DAAwC;AACxC,oDAAkC;AAClC,kDAAgC;AAChC,qDAAmC;AACnC,yDAAuC;AACvC,oDAAkC;AAGlC,6DAA2C;AAC3C,gEAA8C;AAC9C,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/utils/enums/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,8CAA4B;AAC5B,0DAAwC;AACxC,qDAAmC;AACnC,0DAAwC;AACxC,oDAAkC;AAClC,kDAAgC;AAChC,qDAAmC;AACnC,yDAAuC;AACvC,oDAAkC;AAGlC,6DAA2C;AAC3C,gEAA8C;AAC9C,0DAAwC;AACxC,0DAAwC;AACxC,4DAA0C"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- export * from './common/constants';
2
- export * from './common/decorators';
3
- export * from './common/filters';
4
- export * from './common/guards';
5
- export * from './common/interceptors';
1
+ export * from './common/utils';
6
2
  export * from './dto/auth';
7
3
  export * from './dto/user';
8
4
  export * from './dto/transaction';
@@ -10,4 +6,5 @@ export * from './dto/balance';
10
6
  export * from './interfaces';
11
7
  export * from './services/logger';
12
8
  export * from './services/validation';
9
+ export * from './services/pagination.service';
13
10
  export { entities } from './common/entities';
package/dist/index.js CHANGED
@@ -15,11 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.entities = void 0;
18
- __exportStar(require("./common/constants"), exports);
19
- __exportStar(require("./common/decorators"), exports);
20
- __exportStar(require("./common/filters"), exports);
21
- __exportStar(require("./common/guards"), exports);
22
- __exportStar(require("./common/interceptors"), exports);
18
+ __exportStar(require("./common/utils"), exports);
23
19
  __exportStar(require("./dto/auth"), exports);
24
20
  __exportStar(require("./dto/user"), exports);
25
21
  __exportStar(require("./dto/transaction"), exports);
@@ -27,6 +23,7 @@ __exportStar(require("./dto/balance"), exports);
27
23
  __exportStar(require("./interfaces"), exports);
28
24
  __exportStar(require("./services/logger"), exports);
29
25
  __exportStar(require("./services/validation"), exports);
26
+ __exportStar(require("./services/pagination.service"), exports);
30
27
  var entities_1 = require("./common/entities");
31
28
  Object.defineProperty(exports, "entities", { enumerable: true, get: function () { return entities_1.entities; } });
32
29
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,qDAAmC;AACnC,sDAAoC;AACpC,mDAAiC;AACjC,kDAAgC;AAChC,wDAAsC;AAItC,6CAA2B;AAC3B,6CAA2B;AAC3B,oDAAkC;AAClC,gDAA8B;AAG9B,+CAA6B;AAG7B,oDAAkC;AAClC,wDAAsC;AAItC,8CAA6C;AAApC,oGAAA,QAAQ,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,iDAA+B;AAG/B,6CAA2B;AAC3B,6CAA2B;AAC3B,oDAAkC;AAClC,gDAA8B;AAG9B,+CAA6B;AAG7B,oDAAkC;AAClC,wDAAsC;AACtC,gEAA8C;AAG9C,8CAA6C;AAApC,oGAAA,QAAQ,OAAA"}
@@ -0,0 +1,7 @@
1
+ export declare class CryptoService {
2
+ private readonly privateKey;
3
+ private readonly publicKey;
4
+ constructor(path: string);
5
+ encryptData(data: string): string;
6
+ decryptData(encryptedData: string): string;
7
+ }
@@ -0,0 +1,37 @@
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.CryptoService = void 0;
13
+ const common_1 = require("@nestjs/common");
14
+ const fs = require("fs");
15
+ const crypto = require("crypto");
16
+ let CryptoService = class CryptoService {
17
+ constructor(path) {
18
+ this.privateKey = fs.readFileSync(path + '/private.pem', 'utf8');
19
+ this.publicKey = fs.readFileSync(path + '/public.pem', 'utf8');
20
+ }
21
+ encryptData(data) {
22
+ const buffer = Buffer.from(data, 'utf8');
23
+ const encrypted = crypto.publicEncrypt(this.publicKey, buffer);
24
+ return encrypted.toString('base64');
25
+ }
26
+ decryptData(encryptedData) {
27
+ const buffer = Buffer.from(encryptedData, 'base64');
28
+ const decrypted = crypto.privateDecrypt(this.privateKey, buffer);
29
+ return decrypted.toString('utf8');
30
+ }
31
+ };
32
+ exports.CryptoService = CryptoService;
33
+ exports.CryptoService = CryptoService = __decorate([
34
+ (0, common_1.Injectable)(),
35
+ __metadata("design:paramtypes", [String])
36
+ ], CryptoService);
37
+ //# sourceMappingURL=cryptoService.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cryptoService.js","sourceRoot":"","sources":["../../../src/services/crypto/cryptoService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yBAAyB;AACzB,iCAAiC;AAG1B,IAAM,aAAa,GAAnB,MAAM,aAAa;IAIxB,YAAY,IAAa;QAEvB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,cAAc,EAAE,MAAM,CAAC,CAAC;QACjE,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,IAAI,GAAG,aAAa,EAAE,MAAM,CAAC,CAAC;IACjE,CAAC;IAGD,WAAW,CAAC,IAAY;QACtB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACzC,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QAC/D,OAAO,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAGD,WAAW,CAAC,aAAqB;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;QACpD,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACjE,OAAO,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC;CACF,CAAA;AAvBY,sCAAa;wBAAb,aAAa;IADzB,IAAA,mBAAU,GAAE;;GACA,aAAa,CAuBzB"}