@wrcb/cb-common 1.0.313 → 1.0.315

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/build/server.d.ts CHANGED
@@ -42,3 +42,4 @@ export * from './events/couponUsedOnUserSignup';
42
42
  export * from './events/toggledBlockUserEvent';
43
43
  export * from './events/linkToVerifyEmailCreatedEvent';
44
44
  export * from './services/RedisService';
45
+ export * from './services/TenantDataService';
package/build/server.js CHANGED
@@ -58,3 +58,4 @@ __exportStar(require("./events/couponUsedOnUserSignup"), exports);
58
58
  __exportStar(require("./events/toggledBlockUserEvent"), exports);
59
59
  __exportStar(require("./events/linkToVerifyEmailCreatedEvent"), exports);
60
60
  __exportStar(require("./services/RedisService"), exports);
61
+ __exportStar(require("./services/TenantDataService"), exports);
@@ -0,0 +1,18 @@
1
+ import { Tenant } from '../types/tenant';
2
+ export interface TenantData {
3
+ NATS_CLUSTER_ID: string;
4
+ SITE_NAME: string;
5
+ SITE_URL: string;
6
+ SITE_DESCRIPTION: string;
7
+ SOCIAL_X: string;
8
+ SOCIAL_YOUTUBE: string;
9
+ SOCIAL_INSTAGRAM: string;
10
+ SOCIAL_FACEBOOK: string;
11
+ EMAIL_HOST: string;
12
+ EMAIL_PORT: string;
13
+ EMAIL_USER: string;
14
+ }
15
+ export declare class TenantDataService {
16
+ private static tenantDataMap;
17
+ static getTenantData(tenant: Tenant): TenantData;
18
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantDataService = void 0;
4
+ const tenant_1 = require("../types/tenant");
5
+ class TenantDataService {
6
+ static getTenantData(tenant) {
7
+ const data = this.tenantDataMap[tenant];
8
+ if (!data) {
9
+ throw new Error(`Tenant data not found for tenant: ${tenant}`);
10
+ }
11
+ return data;
12
+ }
13
+ }
14
+ exports.TenantDataService = TenantDataService;
15
+ TenantDataService.tenantDataMap = {
16
+ [tenant_1.Tenant.PoliticaBet]: {
17
+ NATS_CLUSTER_ID: 'cripto-bet',
18
+ SITE_NAME: 'Bet',
19
+ SITE_URL: 'https://criptobet.dev',
20
+ SITE_DESCRIPTION: 'Site de previsões políticas',
21
+ SOCIAL_X: 'https://x.com',
22
+ SOCIAL_YOUTUBE: 'https://youtube.com',
23
+ SOCIAL_INSTAGRAM: 'https://instagram.com',
24
+ SOCIAL_FACEBOOK: 'https://facebook.com',
25
+ EMAIL_HOST: 'smtp.gmail.com',
26
+ EMAIL_PORT: '587',
27
+ EMAIL_USER: 'williangrios@gmail.com'
28
+ },
29
+ [tenant_1.Tenant.TourismApp]: {
30
+ NATS_CLUSTER_ID: 'tourism-cluster',
31
+ SITE_NAME: 'Tourism Site',
32
+ SITE_URL: 'https://tourism.dev',
33
+ SITE_DESCRIPTION: 'Descrição do outro site',
34
+ SOCIAL_X: 'https://x.com/outro',
35
+ SOCIAL_YOUTUBE: 'https://youtube.com/outro',
36
+ SOCIAL_INSTAGRAM: 'https://instagram.com/outro',
37
+ SOCIAL_FACEBOOK: 'https://facebook.com/outro',
38
+ EMAIL_HOST: 'smtp.gmail.com',
39
+ EMAIL_PORT: '587',
40
+ EMAIL_USER: 'williangrios@gmail.com'
41
+ },
42
+ [tenant_1.Tenant.Mentorzinho]: {
43
+ NATS_CLUSTER_ID: 'outro-cluster',
44
+ SITE_NAME: 'Outro Site',
45
+ SITE_URL: 'https://outrosite.dev',
46
+ SITE_DESCRIPTION: 'Descrição do outro site',
47
+ SOCIAL_X: 'https://x.com/outro',
48
+ SOCIAL_YOUTUBE: 'https://youtube.com/outro',
49
+ SOCIAL_INSTAGRAM: 'https://instagram.com/outro',
50
+ SOCIAL_FACEBOOK: 'https://facebook.com/outro',
51
+ EMAIL_HOST: 'smtp.gmail.com',
52
+ EMAIL_PORT: '587',
53
+ EMAIL_USER: 'williangrios@gmail.com'
54
+ }
55
+ };
@@ -1,7 +1,5 @@
1
1
  export declare enum Tenant {
2
2
  PoliticaBet = "PoliticaBet",
3
- EducationApp = "EducationApp",
4
- CriptoMilhas = "CriptoMilhas",
5
- FinancesApp = "FinancesApp",
6
- TourismApp = "TourismApp"
3
+ TourismApp = "TourismApp",
4
+ Mentorzinho = "Mentorzinho"
7
5
  }
@@ -4,8 +4,6 @@ exports.Tenant = void 0;
4
4
  var Tenant;
5
5
  (function (Tenant) {
6
6
  Tenant["PoliticaBet"] = "PoliticaBet";
7
- Tenant["EducationApp"] = "EducationApp";
8
- Tenant["CriptoMilhas"] = "CriptoMilhas";
9
- Tenant["FinancesApp"] = "FinancesApp";
10
7
  Tenant["TourismApp"] = "TourismApp";
8
+ Tenant["Mentorzinho"] = "Mentorzinho";
11
9
  })(Tenant || (exports.Tenant = Tenant = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.313",
3
+ "version": "1.0.315",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",