@venturialstd/organization 0.0.13 → 0.0.14

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,4 @@
1
+ export declare enum ENCRYPTION_ALGORITHM {
2
+ AES256 = "aes-256-gcm"
3
+ }
4
+ //# sourceMappingURL=settings-encryption.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-encryption.constants.d.ts","sourceRoot":"","sources":["../../src/constants/settings-encryption.constants.ts"],"names":[],"mappings":"AAAA,oBAAY,oBAAoB;IAC9B,MAAM,gBAAgB;CACvB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ENCRYPTION_ALGORITHM = void 0;
4
+ var ENCRYPTION_ALGORITHM;
5
+ (function (ENCRYPTION_ALGORITHM) {
6
+ ENCRYPTION_ALGORITHM["AES256"] = "aes-256-gcm";
7
+ })(ENCRYPTION_ALGORITHM || (exports.ENCRYPTION_ALGORITHM = ENCRYPTION_ALGORITHM = {}));
8
+ //# sourceMappingURL=settings-encryption.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-encryption.constants.js","sourceRoot":"","sources":["../../src/constants/settings-encryption.constants.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAEX;AAFD,WAAY,oBAAoB;IAC9B,8CAAsB,CAAA;AACxB,CAAC,EAFW,oBAAoB,oCAApB,oBAAoB,QAE/B"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,17 @@
1
- export * from './constants/organization.constant';
2
- export * from './constants/organization.settings.constant';
3
- export * from './constants/settings-type.constant';
4
- export * from './decorators/organization.decorator';
5
- export * from './decorators/roles.decorator';
6
- export * from './dtos/CreateOrganization.dto';
7
- export * from './entities/organization.entity';
8
- export * from './entities/organization-settings.entity';
9
- export * from './entities/organization-user.entity';
10
- export * from './guards/organization.guard';
11
- export * from './organization.module';
12
- export * from './services/organization.service';
13
- export * from './services/organization-settings.service';
14
- export * from './services/organization-user.service';
15
- export * from './settings/organization.settings';
1
+ export * from "./constants/organization.constant";
2
+ export * from "./constants/organization.settings.constant";
3
+ export * from "./constants/settings-type.constant";
4
+ export * from "./decorators/organization.decorator";
5
+ export * from "./decorators/roles.decorator";
6
+ export * from "./dtos/CreateOrganization.dto";
7
+ export * from "./entities/organization.entity";
8
+ export * from "./entities/organization-settings.entity";
9
+ export * from "./entities/organization-user.entity";
10
+ export * from "./guards/organization.guard";
11
+ export * from "./organization.module";
12
+ export * from "./services/organization.service";
13
+ export * from "./services/organization-settings.service";
14
+ export * from "./services/organization-user.service";
15
+ export * from "./services/organization-settings-encryption.service";
16
+ export * from "./settings/organization.settings";
16
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qCAAqC,CAAC;AACpD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,0CAA0C,CAAC;AACzD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qDAAqD,CAAC;AACpE,cAAc,kCAAkC,CAAC"}
package/dist/index.js CHANGED
@@ -28,5 +28,6 @@ __exportStar(require("./organization.module"), exports);
28
28
  __exportStar(require("./services/organization.service"), exports);
29
29
  __exportStar(require("./services/organization-settings.service"), exports);
30
30
  __exportStar(require("./services/organization-user.service"), exports);
31
+ __exportStar(require("./services/organization-settings-encryption.service"), exports);
31
32
  __exportStar(require("./settings/organization.settings"), exports);
32
33
  //# 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":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,6EAA2D;AAC3D,qEAAmD;AACnD,sEAAoD;AACpD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,0EAAwD;AACxD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC;AACtC,kEAAgD;AAChD,2EAAyD;AACzD,uEAAqD;AACrD,mEAAiD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oEAAkD;AAClD,6EAA2D;AAC3D,qEAAmD;AACnD,sEAAoD;AACpD,+DAA6C;AAC7C,gEAA8C;AAC9C,iEAA+C;AAC/C,0EAAwD;AACxD,sEAAoD;AACpD,8DAA4C;AAC5C,wDAAsC;AACtC,kEAAgD;AAChD,2EAAyD;AACzD,uEAAqD;AACrD,sFAAoE;AACpE,mEAAiD"}
@@ -1 +1 @@
1
- {"version":3,"file":"organization.module.d.ts","sourceRoot":"","sources":["../src/organization.module.ts"],"names":[],"mappings":"AAWA,qBAQa,kBAAkB;CAAG"}
1
+ {"version":3,"file":"organization.module.d.ts","sourceRoot":"","sources":["../src/organization.module.ts"],"names":[],"mappings":"AAYA,qBAsBa,kBAAkB;CAAG"}
@@ -16,6 +16,7 @@ const organization_user_entity_1 = require("./entities/organization-user.entity"
16
16
  const organization_service_1 = require("./services/organization.service");
17
17
  const organization_settings_service_1 = require("./services/organization-settings.service");
18
18
  const organization_user_service_1 = require("./services/organization-user.service");
19
+ const organization_settings_encryption_service_1 = require("./services/organization-settings-encryption.service");
19
20
  let OrganizationModule = class OrganizationModule {
20
21
  };
21
22
  exports.OrganizationModule = OrganizationModule;
@@ -23,10 +24,24 @@ exports.OrganizationModule = OrganizationModule = __decorate([
23
24
  (0, common_1.Module)({
24
25
  imports: [
25
26
  core_1.SharedModule.forRoot({}),
26
- typeorm_1.TypeOrmModule.forFeature([organization_entity_1.Organization, organization_user_entity_1.OrganizationUser, organization_settings_entity_1.OrganizationSettings]),
27
+ typeorm_1.TypeOrmModule.forFeature([
28
+ organization_entity_1.Organization,
29
+ organization_user_entity_1.OrganizationUser,
30
+ organization_settings_entity_1.OrganizationSettings,
31
+ ]),
32
+ ],
33
+ providers: [
34
+ organization_service_1.OrganizationService,
35
+ organization_user_service_1.OrganizationUserService,
36
+ organization_settings_service_1.OrganizationSettingsService,
37
+ organization_settings_encryption_service_1.OrganizationSettingsEncryptionService,
38
+ ],
39
+ exports: [
40
+ organization_service_1.OrganizationService,
41
+ organization_user_service_1.OrganizationUserService,
42
+ organization_settings_service_1.OrganizationSettingsService,
43
+ organization_settings_encryption_service_1.OrganizationSettingsEncryptionService,
27
44
  ],
28
- providers: [organization_service_1.OrganizationService, organization_user_service_1.OrganizationUserService, organization_settings_service_1.OrganizationSettingsService],
29
- exports: [organization_service_1.OrganizationService, organization_user_service_1.OrganizationUserService, organization_settings_service_1.OrganizationSettingsService],
30
45
  })
31
46
  ], OrganizationModule);
32
47
  //# sourceMappingURL=organization.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization.module.js","sourceRoot":"","sources":["../src/organization.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,6CAAkD;AAElD,wEAA8D;AAC9D,0FAA+E;AAC/E,kFAAuE;AACvE,0EAAsE;AACtE,4FAAuF;AACvF,oFAA+E;AAUxE,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAR9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,mBAAY,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,uBAAa,CAAC,UAAU,CAAC,CAAC,kCAAY,EAAE,2CAAgB,EAAE,mDAAoB,CAAC,CAAC;SACjF;QACD,SAAS,EAAE,CAAC,0CAAmB,EAAE,mDAAuB,EAAE,2DAA2B,CAAC;QACtF,OAAO,EAAE,CAAC,0CAAmB,EAAE,mDAAuB,EAAE,2DAA2B,CAAC;KACrF,CAAC;GACW,kBAAkB,CAAG"}
1
+ {"version":3,"file":"organization.module.js","sourceRoot":"","sources":["../src/organization.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,6CAAgD;AAChD,6CAAkD;AAElD,wEAA8D;AAC9D,0FAA+E;AAC/E,kFAAuE;AACvE,0EAAsE;AACtE,4FAAuF;AACvF,oFAA+E;AAC/E,kHAA4G;AAwBrG,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAtB9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,mBAAY,CAAC,OAAO,CAAC,EAAE,CAAC;YACxB,uBAAa,CAAC,UAAU,CAAC;gBACvB,kCAAY;gBACZ,2CAAgB;gBAChB,mDAAoB;aACrB,CAAC;SACH;QACD,SAAS,EAAE;YACT,0CAAmB;YACnB,mDAAuB;YACvB,2DAA2B;YAC3B,gFAAqC;SACtC;QACD,OAAO,EAAE;YACP,0CAAmB;YACnB,mDAAuB;YACvB,2DAA2B;YAC3B,gFAAqC;SACtC;KACF,CAAC;GACW,kBAAkB,CAAG"}
@@ -0,0 +1,13 @@
1
+ import { AppLogger } from "@venturialstd/core";
2
+ export declare class OrganizationSettingsEncryptionService {
3
+ private readonly logger;
4
+ private readonly algorithm;
5
+ private readonly keyLength;
6
+ private readonly ivLength;
7
+ private readonly encryptionKey;
8
+ constructor(logger: AppLogger);
9
+ encrypt(plainText: string): string;
10
+ decrypt(encryptedText: string): string;
11
+ isEncrypted(value: string): boolean;
12
+ }
13
+ //# sourceMappingURL=organization-settings-encryption.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-settings-encryption.service.d.ts","sourceRoot":"","sources":["../../src/services/organization-settings-encryption.service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,qBACa,qCAAqC;IAMpC,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+B;IACzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAM;IAChC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAM;IAC/B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;gBAEV,MAAM,EAAE,SAAS;IA6B9C,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAsBlC,OAAO,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM;IA+BtC,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAUpC"}
@@ -0,0 +1,121 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
+ 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;
22
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23
+ };
24
+ var __importStar = (this && this.__importStar) || (function () {
25
+ var ownKeys = function(o) {
26
+ ownKeys = Object.getOwnPropertyNames || function (o) {
27
+ var ar = [];
28
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
+ return ar;
30
+ };
31
+ return ownKeys(o);
32
+ };
33
+ return function (mod) {
34
+ if (mod && mod.__esModule) return mod;
35
+ var result = {};
36
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
+ __setModuleDefault(result, mod);
38
+ return result;
39
+ };
40
+ })();
41
+ var __metadata = (this && this.__metadata) || function (k, v) {
42
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.OrganizationSettingsEncryptionService = void 0;
46
+ const common_1 = require("@nestjs/common");
47
+ const crypto = __importStar(require("crypto"));
48
+ const settings_encryption_constants_1 = require("../constants/settings-encryption.constants");
49
+ const core_1 = require("@venturialstd/core");
50
+ let OrganizationSettingsEncryptionService = class OrganizationSettingsEncryptionService {
51
+ logger;
52
+ algorithm = settings_encryption_constants_1.ENCRYPTION_ALGORITHM.AES256;
53
+ keyLength = 32;
54
+ ivLength = 16;
55
+ encryptionKey;
56
+ constructor(logger) {
57
+ this.logger = logger;
58
+ const secret = process.env.SETTINGS_ENCRYPTION_KEY;
59
+ const salt = process.env.SETTINGS_ENCRYPTION_SALT;
60
+ const MIN_KEY_LENGTH = 16;
61
+ if (!secret || !salt) {
62
+ this.logger.error("ENCRYPTION KEY or SALT is not defined in environment variables");
63
+ throw new Error("ENCRYPTION KEY or SALT is required in environment variables");
64
+ }
65
+ if (Buffer.from(secret).length < MIN_KEY_LENGTH) {
66
+ this.logger.warn("SETTINGS_ENCRYPTION_KEY is too short; consider using at least 16 characters");
67
+ }
68
+ if (Buffer.from(salt).length < MIN_KEY_LENGTH) {
69
+ this.logger.warn("SETTINGS_ENCRYPTION_SALT is too short; consider using at least 16 characters");
70
+ }
71
+ this.encryptionKey = crypto.scryptSync(secret, salt, this.keyLength);
72
+ }
73
+ encrypt(plainText) {
74
+ try {
75
+ const initVector = crypto.randomBytes(this.ivLength);
76
+ const cipher = crypto.createCipheriv(this.algorithm, this.encryptionKey, initVector);
77
+ let encrypted = cipher.update(plainText, "utf8", "hex");
78
+ encrypted += cipher.final("hex");
79
+ const authTag = cipher.getAuthTag();
80
+ return `${initVector.toString("hex")}:${encrypted}:${authTag.toString("hex")}`;
81
+ }
82
+ catch (error) {
83
+ this.logger.error("Encryption failed:", error);
84
+ throw error;
85
+ }
86
+ }
87
+ decrypt(encryptedText) {
88
+ try {
89
+ const parts = encryptedText.split(":");
90
+ if (parts.length !== 3) {
91
+ throw new Error("Invalid encrypted text format");
92
+ }
93
+ const [ivHex, encryptedHex, authTagHex] = parts;
94
+ const iv = Buffer.from(ivHex, "hex");
95
+ const encrypted = Buffer.from(encryptedHex, "hex");
96
+ const authTag = Buffer.from(authTagHex, "hex");
97
+ const decipher = crypto.createDecipheriv(this.algorithm, this.encryptionKey, iv);
98
+ decipher.setAuthTag(authTag);
99
+ let decrypted = decipher.update(encrypted, undefined, "utf8");
100
+ decrypted += decipher.final("utf8");
101
+ return decrypted;
102
+ }
103
+ catch (error) {
104
+ this.logger.error("Descryption failed:", error);
105
+ throw error;
106
+ }
107
+ }
108
+ isEncrypted(value) {
109
+ if (!value || typeof value !== "string") {
110
+ return false;
111
+ }
112
+ const parts = value.split(":");
113
+ return (parts.length === 3 && parts.every((part) => /^[0-9a-f]+$/i.test(part)));
114
+ }
115
+ };
116
+ exports.OrganizationSettingsEncryptionService = OrganizationSettingsEncryptionService;
117
+ exports.OrganizationSettingsEncryptionService = OrganizationSettingsEncryptionService = __decorate([
118
+ (0, common_1.Injectable)(),
119
+ __metadata("design:paramtypes", [core_1.AppLogger])
120
+ ], OrganizationSettingsEncryptionService);
121
+ //# sourceMappingURL=organization-settings-encryption.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organization-settings-encryption.service.js","sourceRoot":"","sources":["../../src/services/organization-settings-encryption.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,+CAAiC;AACjC,8FAAkF;AAClF,6CAA+C;AAGxC,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAMnB;IALZ,SAAS,GAAG,oDAAoB,CAAC,MAAM,CAAC;IACxC,SAAS,GAAG,EAAE,CAAC;IACf,QAAQ,GAAG,EAAE,CAAC;IACd,aAAa,CAAS;IAEvC,YAA6B,MAAiB;QAAjB,WAAM,GAAN,MAAM,CAAW;QAC5C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC;QACnD,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAClD,MAAM,cAAc,GAAG,EAAE,CAAC;QAE1B,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,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CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,OAAO,CACL,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACvE,CAAC;IACJ,CAAC;CACF,CAAA;AAlGY,sFAAqC;gDAArC,qCAAqC;IADjD,IAAA,mBAAU,GAAE;qCAO0B,gBAAS;GANnC,qCAAqC,CAkGjD"}
@@ -1,9 +1,11 @@
1
- import { TypeOrmCrudService } from '@dataui/crud-typeorm';
2
- import { DeepPartial, Repository } from 'typeorm';
3
- import { OrganizationSettings } from '../entities/organization-settings.entity';
1
+ import { TypeOrmCrudService } from "@dataui/crud-typeorm";
2
+ import { DeepPartial, Repository } from "typeorm";
3
+ import { OrganizationSettings } from "../entities/organization-settings.entity";
4
+ import { OrganizationSettingsEncryptionService } from "./organization-settings-encryption.service";
4
5
  export declare class OrganizationSettingsService extends TypeOrmCrudService<OrganizationSettings> {
5
6
  private readonly organizationSettingsRepo;
6
- constructor(organizationSettingsRepo: Repository<OrganizationSettings>);
7
+ private readonly settingsEncryptionService;
8
+ constructor(organizationSettingsRepo: Repository<OrganizationSettings>, settingsEncryptionService: OrganizationSettingsEncryptionService);
7
9
  get(organizationId: string, key: string): Promise<string | undefined>;
8
10
  getManySettings(organizationId: string, keys: string[]): Promise<Record<string, string>>;
9
11
  getAllForOrganization(organizationId: string, module?: string): Promise<OrganizationSettings[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"organization-settings.service.d.ts","sourceRoot":"","sources":["../../src/services/organization-settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAOhF,qBACa,2BAA4B,SAAQ,kBAAkB,CAAC,oBAAoB,CAAC;IAGrF,OAAO,CAAC,QAAQ,CAAC,wBAAwB;gBAAxB,wBAAwB,EAAE,UAAU,CAAC,oBAAoB,CAAC;IAWvE,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IA0BrE,eAAe,CAAC,cAAc,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAiBxF,qBAAqB,CACzB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAoB5B,sBAAsB,CAC1B,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,WAAW,CAAC,oBAAoB,CAAC,GACrC,OAAO,CAAC,oBAAoB,CAAC;IAiC1B,yBAAyB,CAC7B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAcV,mBAAmB,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAY1E,kBAAkB,CACtB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,WAAW,CAAC,oBAAoB,CAAC,EAAE,GAC5C,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAUnC"}
1
+ {"version":3,"file":"organization-settings.service.d.ts","sourceRoot":"","sources":["../../src/services/organization-settings.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAElD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAAE,qCAAqC,EAAE,MAAM,4CAA4C,CAAC;AAOnG,qBACa,2BAA4B,SAAQ,kBAAkB,CAAC,oBAAoB,CAAC;IAGrF,OAAO,CAAC,QAAQ,CAAC,wBAAwB;IACzC,OAAO,CAAC,QAAQ,CAAC,yBAAyB;gBADzB,wBAAwB,EAAE,UAAU,CAAC,oBAAoB,CAAC,EAC1D,yBAAyB,EAAE,qCAAqC;IAW7E,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAmCrE,eAAe,CACnB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAiB5B,qBAAqB,CACzB,cAAc,EAAE,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAsB5B,sBAAsB,CAC1B,cAAc,EAAE,MAAM,EACtB,GAAG,EAAE,WAAW,CAAC,oBAAoB,CAAC,GACrC,OAAO,CAAC,oBAAoB,CAAC;IAwC1B,yBAAyB,CAC7B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;IAcV,mBAAmB,CACvB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAYV,kBAAkB,CACtB,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,WAAW,CAAC,oBAAoB,CAAC,EAAE,GAC5C,OAAO,CAAC,oBAAoB,EAAE,CAAC;CAUnC"}
@@ -18,16 +18,20 @@ const common_1 = require("@nestjs/common");
18
18
  const typeorm_1 = require("@nestjs/typeorm");
19
19
  const typeorm_2 = require("typeorm");
20
20
  const organization_settings_entity_1 = require("../entities/organization-settings.entity");
21
+ const settings_type_constant_1 = require("../constants/settings-type.constant");
22
+ const organization_settings_encryption_service_1 = require("./organization-settings-encryption.service");
21
23
  let OrganizationSettingsService = class OrganizationSettingsService extends crud_typeorm_1.TypeOrmCrudService {
22
24
  organizationSettingsRepo;
23
- constructor(organizationSettingsRepo) {
25
+ settingsEncryptionService;
26
+ constructor(organizationSettingsRepo, settingsEncryptionService) {
24
27
  super(organizationSettingsRepo);
25
28
  this.organizationSettingsRepo = organizationSettingsRepo;
29
+ this.settingsEncryptionService = settingsEncryptionService;
26
30
  }
27
31
  async get(organizationId, key) {
28
- const keyParts = key.split(':');
32
+ const keyParts = key.split(":");
29
33
  if (keyParts.length !== 3) {
30
- throw new Error('Invalid key format. Expected format: module:section:key');
34
+ throw new Error("Invalid key format. Expected format: module:section:key");
31
35
  }
32
36
  const [module, section, configKey] = keyParts;
33
37
  const orgSetting = await this.organizationSettingsRepo.findOne({
@@ -38,6 +42,10 @@ let OrganizationSettingsService = class OrganizationSettingsService extends crud
38
42
  key: configKey,
39
43
  },
40
44
  });
45
+ if (orgSetting?.type === settings_type_constant_1.SETTINGS_TYPE.SECRET &&
46
+ this.settingsEncryptionService.isEncrypted(orgSetting.value)) {
47
+ return this.settingsEncryptionService.decrypt(orgSetting.value);
48
+ }
41
49
  return orgSetting?.value;
42
50
  }
43
51
  async getManySettings(organizationId, keys) {
@@ -51,17 +59,24 @@ let OrganizationSettingsService = class OrganizationSettingsService extends crud
51
59
  return results;
52
60
  }
53
61
  async getAllForOrganization(organizationId, module) {
54
- const whereClause = { organizationId };
62
+ const whereClause = {
63
+ organizationId,
64
+ };
55
65
  if (module) {
56
66
  whereClause.module = module;
57
67
  }
58
68
  const orgSettings = await this.organizationSettingsRepo.find({
59
69
  where: whereClause,
60
- order: { sortOrder: 'ASC' },
70
+ order: { sortOrder: "ASC" },
61
71
  });
62
72
  return orgSettings;
63
73
  }
64
74
  async setOrganizationSetting(organizationId, dto) {
75
+ if (dto.type === settings_type_constant_1.SETTINGS_TYPE.SECRET &&
76
+ dto.value &&
77
+ !this.settingsEncryptionService.isEncrypted(dto.value)) {
78
+ dto.value = this.settingsEncryptionService.encrypt(dto.value);
79
+ }
65
80
  const existingSetting = await this.organizationSettingsRepo.findOne({
66
81
  where: {
67
82
  organizationId,
@@ -109,6 +124,7 @@ exports.OrganizationSettingsService = OrganizationSettingsService;
109
124
  exports.OrganizationSettingsService = OrganizationSettingsService = __decorate([
110
125
  (0, common_1.Injectable)(),
111
126
  __param(0, (0, typeorm_1.InjectRepository)(organization_settings_entity_1.OrganizationSettings)),
112
- __metadata("design:paramtypes", [typeorm_2.Repository])
127
+ __metadata("design:paramtypes", [typeorm_2.Repository,
128
+ organization_settings_encryption_service_1.OrganizationSettingsEncryptionService])
113
129
  ], OrganizationSettingsService);
114
130
  //# sourceMappingURL=organization-settings.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"organization-settings.service.js","sourceRoot":"","sources":["../../src/services/organization-settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uDAA0D;AAC1D,2CAA4C;AAC5C,6CAAmD;AACnD,qCAAkD;AAElD,2FAAgF;AAQzE,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,iCAAwC;IAGpE;IAFnB,YAEmB,wBAA0D;QAE3E,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAFf,6BAAwB,GAAxB,wBAAwB,CAAkC;IAG7E,CAAC;IAQD,KAAK,CAAC,GAAG,CAAC,cAAsB,EAAE,GAAW;QAC3C,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;QAG9C,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,wBAAwB,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AAC;YAEpB,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;gBACxC,GAAG,eAAe;gBAClB,GAAG,GAAG;gBACN,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QAGD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;YACxC,GAAG,GAAG;YACN,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IASD,KAAK,CAAC,yBAAyB,CAC7B,cAAsB,EACtB,MAAc,EACd,OAAe,EACf,GAAW;QAEX,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;YACzC,cAAc;YACd,MAAM;YACN,OAAO;YACP,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;IAOD,KAAK,CAAC,mBAAmB,CAAC,cAAsB,EAAE,MAAc;QAC9D,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;YACzC,cAAc;YACd,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAOD,KAAK,CAAC,kBAAkB,CACtB,cAAsB,EACtB,QAA6C;QAE7C,MAAM,OAAO,GAA2B,EAAE,CAAC;QAE3C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAhKY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mDAAoB,CAAC,CAAA;qCACI,oBAAU;GAH5C,2BAA2B,CAgKvC"}
1
+ {"version":3,"file":"organization-settings.service.js","sourceRoot":"","sources":["../../src/services/organization-settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uDAA0D;AAC1D,2CAA4C;AAC5C,6CAAmD;AACnD,qCA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,GAAG;gBACN,cAAc;aACf,CAAC,CAAC;QACL,CAAC;QAGD,OAAO,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC;YACxC,GAAG,GAAG;YACN,cAAc;SACf,CAAC,CAAC;IACL,CAAC;IASD,KAAK,CAAC,yBAAyB,CAC7B,cAAsB,EACtB,MAAc,EACd,OAAe,EACf,GAAW;QAEX,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;YACzC,cAAc;YACd,MAAM;YACN,OAAO;YACP,GAAG;SACJ,CAAC,CAAC;IACL,CAAC;IAOD,KAAK,CAAC,mBAAmB,CACvB,cAAsB,EACtB,MAAc;QAEd,MAAM,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC;YACzC,cAAc;YACd,MAAM;SACP,CAAC,CAAC;IACL,CAAC;IAOD,KAAK,CAAC,kBAAkB,CACtB,cAAsB,EACtB,QAA6C;QAE7C,MAAM,OAAO,GAA2B,EAAE,CAAC;QAE3C,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAC1E,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;CACF,CAAA;AAzLY,kEAA2B;sCAA3B,2BAA2B;IADvC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,mDAAoB,CAAC,CAAA;qCACI,oBAAU;QACT,gFAAqC;GAJxE,2BAA2B,CAyLvC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venturialstd/organization",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "description": "Organization Management Module for Venturial",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",