@wrcb/cb-common 1.0.626 → 1.0.627

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.
@@ -10,7 +10,6 @@ export interface PromotionCreatedEvent {
10
10
  titulo: string;
11
11
  descricao: string;
12
12
  categoria: string;
13
- categoriasAdicionais?: string[];
14
13
  linkAfiliado: string;
15
14
  imagemUrl?: string;
16
15
  preco?: number;
@@ -7,6 +7,7 @@ export declare class RedisService {
7
7
  static withdrawSettingsKey(tenant: Tenant): string;
8
8
  static maintenanceSettingsKey(tenant: Tenant): string;
9
9
  static userBalanceKey(tenant: Tenant, userId: string): string;
10
+ static productDataKey(tenant: Tenant, productId: string): string;
10
11
  static bannedViewerKey(streamerId: string, viewerId: string): string;
11
12
  static promotionByIdKey(tenant: Tenant, promotionId: string): string;
12
13
  static promotionsListKey(params: {
@@ -23,6 +23,9 @@ class RedisService {
23
23
  static userBalanceKey(tenant, userId) {
24
24
  return tenant + ':' + userId + ':balance';
25
25
  }
26
+ static productDataKey(tenant, productId) {
27
+ return tenant + ':' + productId + ':product:data';
28
+ }
26
29
  static bannedViewerKey(streamerId, viewerId) {
27
30
  return `banned:${streamerId}:${viewerId}`;
28
31
  }
@@ -529,5 +529,99 @@ TenantDataService.tenantDataMap = {
529
529
  minCriteriaCount: 1,
530
530
  maxCriteriaCount: 5
531
531
  }
532
+ },
533
+ [tenant_1.Tenant.Compranomia]: {
534
+ TENANT: tenant_1.Tenant.Compranomia,
535
+ SITE_NAME: 'Compranomia',
536
+ SITE_URL: 'https://compranomia.com.br',
537
+ SITE_DESCRIPTION: 'Compras locais de supermercado, farmácia e muito mais!',
538
+ KEYWORDS: [
539
+ 'supermercado',
540
+ 'farmácia',
541
+ 'açougue',
542
+ 'padaria',
543
+ 'delivery',
544
+ 'compras locais',
545
+ 'mercearia',
546
+ 'pet shop',
547
+ 'peixaria',
548
+ 'sacolão'
549
+ ],
550
+ SOCIAL_X: 'https://x.com/compranomia',
551
+ SOCIAL_YOUTUBE: 'https://youtube.com/compranomia',
552
+ SOCIAL_INSTAGRAM: 'https://instagram.com/compranomia',
553
+ SOCIAL_FACEBOOK: 'https://facebook.com/compranomia',
554
+ USER_CATEGORIES_CONFIG: {
555
+ [userCategory_1.UserCategory.Grocery]: {
556
+ allowedTags: [],
557
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
558
+ },
559
+ [userCategory_1.UserCategory.Pharmacy]: {
560
+ allowedTags: [],
561
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
562
+ },
563
+ [userCategory_1.UserCategory.Butcher]: {
564
+ allowedTags: [],
565
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
566
+ },
567
+ [userCategory_1.UserCategory.Greengrocer]: {
568
+ allowedTags: [],
569
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
570
+ },
571
+ [userCategory_1.UserCategory.Bakery]: {
572
+ allowedTags: [],
573
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
574
+ },
575
+ [userCategory_1.UserCategory.PetShop]: {
576
+ allowedTags: [],
577
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
578
+ },
579
+ [userCategory_1.UserCategory.ConvenienceStore]: {
580
+ allowedTags: [],
581
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
582
+ },
583
+ [userCategory_1.UserCategory.Fishmonger]: {
584
+ allowedTags: [],
585
+ allowedProducts: productTypes_1.COMPRANOMIA_PRODUCTS_SERVICES
586
+ }
587
+ },
588
+ COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_SELLER: [
589
+ couponType_1.CouponType.FixedValue,
590
+ couponType_1.CouponType.Percentage
591
+ ],
592
+ COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_ADMIN: [
593
+ couponType_1.CouponType.FixedValue,
594
+ couponType_1.CouponType.Percentage
595
+ ],
596
+ EMAIL_HOST: 'smtp.gmail.com',
597
+ EMAIL_PORT: '587',
598
+ EMAIL_USER: 'contato@compranomia.com.br',
599
+ AUTH_FACEBOOK_APP_ID: '',
600
+ AUTH_GOOGLE_ID: '',
601
+ AUTH_GOOGLE_SECRET: '',
602
+ GOOGLE_ANALYTICS_MEASUREMENT_ID: '',
603
+ GOOGLE_VERIFICATION: '',
604
+ MEDIA_CONFIG: {
605
+ maxPhotoSizeMB: 5,
606
+ maxVideoSizeMB: 20,
607
+ allowedImageFormats: ['jpg', 'jpeg', 'png', 'webp'],
608
+ allowedVideoFormats: ['mp4', 'webm'],
609
+ imageQualities: {
610
+ thumbnail: { width: 150, height: 150, quality: 80 },
611
+ medium: { width: 800, height: 800, quality: 85 },
612
+ large: { width: 1200, height: 1200, quality: 90 }
613
+ }
614
+ },
615
+ RATING_CRITERIA: {
616
+ criteriaOptions: [
617
+ 'ProductQuality', // Qualidade dos produtos
618
+ 'DeliverySpeed', // Rapidez na entrega
619
+ 'Packaging', // Embalagem
620
+ 'CustomerService', // Atendimento
621
+ 'PriceValue' // Custo-benefício
622
+ ],
623
+ minCriteriaCount: 1,
624
+ maxCriteriaCount: 5
625
+ }
532
626
  }
533
627
  };
@@ -0,0 +1,10 @@
1
+ export declare enum CompranomiaCategory {
2
+ Grocery = "Grocery",// Mercearia
3
+ Pharmacy = "Pharmacy",// Farmácia
4
+ Butcher = "Butcher",// Açougue
5
+ Greengrocer = "Greengrocer",// Sacolão/Hortifruti
6
+ Bakery = "Bakery",// Padaria
7
+ PetShop = "PetShop",// Pet Shop
8
+ ConvenienceStore = "ConvenienceStore",// Loja de Conveniência
9
+ Fishmonger = "Fishmonger"
10
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompranomiaCategory = void 0;
4
+ var CompranomiaCategory;
5
+ (function (CompranomiaCategory) {
6
+ CompranomiaCategory["Grocery"] = "Grocery";
7
+ CompranomiaCategory["Pharmacy"] = "Pharmacy";
8
+ CompranomiaCategory["Butcher"] = "Butcher";
9
+ CompranomiaCategory["Greengrocer"] = "Greengrocer";
10
+ CompranomiaCategory["Bakery"] = "Bakery";
11
+ CompranomiaCategory["PetShop"] = "PetShop";
12
+ CompranomiaCategory["ConvenienceStore"] = "ConvenienceStore";
13
+ CompranomiaCategory["Fishmonger"] = "Fishmonger"; // Peixaria
14
+ })(CompranomiaCategory || (exports.CompranomiaCategory = CompranomiaCategory = {}));
@@ -9,7 +9,9 @@ export declare enum ProductTypes {
9
9
  SellTickets = "SellTickets",
10
10
  Live = "Live",
11
11
  Photos = "Photos",
12
- Videos = "Videos"
12
+ Videos = "Videos",
13
+ PhysicalProduct = "PhysicalProduct",
14
+ Services = "Services"
13
15
  }
14
16
  export declare const TOUR_PRODUCTS: ProductTypes[];
15
17
  export declare const RESTAURANT_PRODUCTS: ProductTypes[];
@@ -19,6 +21,7 @@ export declare const EVENT_PRODUCTS: ProductTypes[];
19
21
  export declare const DAY_USE_PRODUCTS: ProductTypes[];
20
22
  export declare const TOUR_GUIDE_PRODUCTS: ProductTypes[];
21
23
  export declare const HOME_SERVICE_PRODUCTS: ProductTypes[];
24
+ export declare const COMPRANOMIA_PRODUCTS_SERVICES: ProductTypes[];
22
25
  export declare const LOCATION_BASED_PRODUCTS: ProductTypes[];
23
26
  export declare const VENUE_BASED_PRODUCTS: ProductTypes[];
24
27
  export declare const TICKETED_BASED_PRODUCTS: ProductTypes[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DIGITAL_CONTENT_BASED_PRODUCTS = exports.TICKETED_BASED_PRODUCTS = exports.VENUE_BASED_PRODUCTS = exports.LOCATION_BASED_PRODUCTS = exports.HOME_SERVICE_PRODUCTS = exports.TOUR_GUIDE_PRODUCTS = exports.DAY_USE_PRODUCTS = exports.EVENT_PRODUCTS = exports.SHOW_PRODUCTS = exports.TRANSFER_PRODUCTS = exports.RESTAURANT_PRODUCTS = exports.TOUR_PRODUCTS = exports.ProductTypes = void 0;
3
+ exports.DIGITAL_CONTENT_BASED_PRODUCTS = exports.TICKETED_BASED_PRODUCTS = exports.VENUE_BASED_PRODUCTS = exports.LOCATION_BASED_PRODUCTS = exports.COMPRANOMIA_PRODUCTS_SERVICES = exports.HOME_SERVICE_PRODUCTS = exports.TOUR_GUIDE_PRODUCTS = exports.DAY_USE_PRODUCTS = exports.EVENT_PRODUCTS = exports.SHOW_PRODUCTS = exports.TRANSFER_PRODUCTS = exports.RESTAURANT_PRODUCTS = exports.TOUR_PRODUCTS = exports.ProductTypes = void 0;
4
4
  var ProductTypes;
5
5
  (function (ProductTypes) {
6
6
  // Tourism
@@ -16,6 +16,9 @@ var ProductTypes;
16
16
  ProductTypes["Live"] = "Live";
17
17
  ProductTypes["Photos"] = "Photos";
18
18
  ProductTypes["Videos"] = "Videos";
19
+ // Compranomia
20
+ ProductTypes["PhysicalProduct"] = "PhysicalProduct";
21
+ ProductTypes["Services"] = "Services";
19
22
  })(ProductTypes || (exports.ProductTypes = ProductTypes = {}));
20
23
  exports.TOUR_PRODUCTS = [ProductTypes.LocationTour, ProductTypes.VenueTour];
21
24
  exports.RESTAURANT_PRODUCTS = [ProductTypes.BookTable];
@@ -25,6 +28,10 @@ exports.EVENT_PRODUCTS = [ProductTypes.SellTickets];
25
28
  exports.DAY_USE_PRODUCTS = [ProductTypes.BookDayUse];
26
29
  exports.TOUR_GUIDE_PRODUCTS = [ProductTypes.BookTourGuide];
27
30
  exports.HOME_SERVICE_PRODUCTS = [ProductTypes.BookHomeService];
31
+ exports.COMPRANOMIA_PRODUCTS_SERVICES = [
32
+ ProductTypes.PhysicalProduct,
33
+ ProductTypes.Services
34
+ ];
28
35
  exports.LOCATION_BASED_PRODUCTS = [
29
36
  ProductTypes.LocationTour,
30
37
  ProductTypes.BookHomeService,
@@ -2,5 +2,6 @@ export declare enum Tenant {
2
2
  PoliticaBet = "PoliticaBet",
3
3
  PromoApp = "PromoApp",
4
4
  TourismApp = "TourismApp",
5
+ Compranomia = "Compranomia",
5
6
  PrivateShow = "PrivateShow"
6
7
  }
@@ -6,5 +6,6 @@ var Tenant;
6
6
  Tenant["PoliticaBet"] = "PoliticaBet";
7
7
  Tenant["PromoApp"] = "PromoApp";
8
8
  Tenant["TourismApp"] = "TourismApp";
9
+ Tenant["Compranomia"] = "Compranomia";
9
10
  Tenant["PrivateShow"] = "PrivateShow";
10
11
  })(Tenant || (exports.Tenant = Tenant = {}));
@@ -10,5 +10,13 @@ export declare enum UserCategory {
10
10
  Transfer = "Transfer",// produto 1 (geolocalização do cliente após venda abrir chat)
11
11
  TourGuide = "TourGuide",// produto 1 (geolocalização do cliente após venda abrir chat)
12
12
  Show = "Show",// produto 3 (geolocalização da empresa, emissão de ticket)
13
- Event = "Event"
13
+ Event = "Event",// produto 3 (geolocalização da empresa, emissão de ticket)
14
+ Grocery = "Grocery",
15
+ Pharmacy = "Pharmacy",
16
+ Butcher = "Butcher",
17
+ Greengrocer = "Greengrocer",
18
+ Bakery = "Bakery",
19
+ PetShop = "PetShop",
20
+ ConvenienceStore = "ConvenienceStore",
21
+ Fishmonger = "Fishmonger"
14
22
  }
@@ -16,5 +16,14 @@ var UserCategory;
16
16
  UserCategory["Transfer"] = "Transfer";
17
17
  UserCategory["TourGuide"] = "TourGuide";
18
18
  UserCategory["Show"] = "Show";
19
- UserCategory["Event"] = "Event"; // produto 3 (geolocalização da empresa, emissão de ticket)
19
+ UserCategory["Event"] = "Event";
20
+ // Compranomia
21
+ UserCategory["Grocery"] = "Grocery";
22
+ UserCategory["Pharmacy"] = "Pharmacy";
23
+ UserCategory["Butcher"] = "Butcher";
24
+ UserCategory["Greengrocer"] = "Greengrocer";
25
+ UserCategory["Bakery"] = "Bakery";
26
+ UserCategory["PetShop"] = "PetShop";
27
+ UserCategory["ConvenienceStore"] = "ConvenienceStore";
28
+ UserCategory["Fishmonger"] = "Fishmonger";
20
29
  })(UserCategory || (exports.UserCategory = UserCategory = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.626",
3
+ "version": "1.0.627",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",