feat(api): add price history, Stringee SMS, Zalo OA, WebSocket notifications, and feature-listing command
- Add PriceHistory model + migration, price-changed domain event, and event handler - Add GetPriceHistory query handler and controller endpoint - Implement StringeeSmsService and ZaloOaService with unit tests - Add Zalo ZNS templates for Vietnamese notification messages - Add WebSocket notification gateway for real-time push - Add FeatureListingCommand for promoted listings - Apply remaining consistent-type-imports lint fixes across API modules Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { InjectMetric } from '@willsoto/nestjs-prometheus';
|
||||
import { Counter } from 'prom-client';
|
||||
import { type Counter } from 'prom-client';
|
||||
import {
|
||||
CircuitBreaker,
|
||||
CircuitOpenError,
|
||||
type CircuitState,
|
||||
LoggerService,
|
||||
type LoggerService,
|
||||
} from '@modules/shared';
|
||||
import {
|
||||
ISearchRepository,
|
||||
type ISearchRepository,
|
||||
type ListingDocument,
|
||||
type SearchParams,
|
||||
type SearchResult,
|
||||
} from '../../domain/repositories/search.repository';
|
||||
import { PostgresSearchRepository } from './postgres-search.repository';
|
||||
import { TypesenseSearchRepository } from './typesense-search.repository';
|
||||
import { type PostgresSearchRepository } from './postgres-search.repository';
|
||||
import { type TypesenseSearchRepository } from './typesense-search.repository';
|
||||
|
||||
export const SEARCH_DEGRADATION_TOTAL = 'search_degradation_total';
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { Client as TypesenseClient } from 'typesense';
|
||||
import { CollectionCreateSchema } from 'typesense/lib/Typesense/Collections';
|
||||
import { LoggerService } from '@modules/shared';
|
||||
import { type Client as TypesenseClient } from 'typesense';
|
||||
import { type CollectionCreateSchema } from 'typesense/lib/Typesense/Collections';
|
||||
import { type LoggerService } from '@modules/shared';
|
||||
import {
|
||||
ISearchRepository,
|
||||
type ISearchRepository,
|
||||
type ListingDocument,
|
||||
type SearchParams,
|
||||
type SearchResult,
|
||||
} from '../../domain/repositories/search.repository';
|
||||
import { TypesenseClientService } from './typesense-client.service';
|
||||
import { type TypesenseClientService } from './typesense-client.service';
|
||||
|
||||
const COLLECTION_NAME = 'listings';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import {
|
||||
ApiTags,
|
||||
ApiOperation,
|
||||
@@ -17,17 +17,17 @@ import {
|
||||
ApiBearerAuth,
|
||||
ApiParam,
|
||||
} from '@nestjs/swagger';
|
||||
import { JwtPayload, CurrentUser, JwtAuthGuard } from '@modules/auth';
|
||||
import { type JwtPayload, CurrentUser, JwtAuthGuard } from '@modules/auth';
|
||||
import { CreateSavedSearchCommand } from '../../application/commands/create-saved-search/create-saved-search.command';
|
||||
import { CreateSavedSearchResult } from '../../application/commands/create-saved-search/create-saved-search.handler';
|
||||
import { type CreateSavedSearchResult } from '../../application/commands/create-saved-search/create-saved-search.handler';
|
||||
import { DeleteSavedSearchCommand } from '../../application/commands/delete-saved-search/delete-saved-search.command';
|
||||
import { UpdateSavedSearchCommand } from '../../application/commands/update-saved-search/update-saved-search.command';
|
||||
import { UpdateSavedSearchResult } from '../../application/commands/update-saved-search/update-saved-search.handler';
|
||||
import { SavedSearchDetail } from '../../application/queries/get-saved-search/get-saved-search.handler';
|
||||
import { type UpdateSavedSearchResult } from '../../application/commands/update-saved-search/update-saved-search.handler';
|
||||
import { type SavedSearchDetail } from '../../application/queries/get-saved-search/get-saved-search.handler';
|
||||
import { GetSavedSearchQuery } from '../../application/queries/get-saved-search/get-saved-search.query';
|
||||
import { SavedSearchListResult } from '../../application/queries/get-saved-searches/get-saved-searches.handler';
|
||||
import { type SavedSearchListResult } from '../../application/queries/get-saved-searches/get-saved-searches.handler';
|
||||
import { GetSavedSearchesQuery } from '../../application/queries/get-saved-searches/get-saved-searches.query';
|
||||
import { CreateSavedSearchDto, UpdateSavedSearchDto, SavedSearchListDto } from '../dto/saved-search.dto';
|
||||
import { type CreateSavedSearchDto, type UpdateSavedSearchDto, type SavedSearchListDto } from '../dto/saved-search.dto';
|
||||
|
||||
@ApiTags('saved-searches')
|
||||
@ApiBearerAuth('JWT')
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Query,
|
||||
UseGuards,
|
||||
} from '@nestjs/common';
|
||||
import { CommandBus, QueryBus } from '@nestjs/cqrs';
|
||||
import { type CommandBus, type QueryBus } from '@nestjs/cqrs';
|
||||
import {
|
||||
ApiTags,
|
||||
ApiOperation,
|
||||
@@ -15,12 +15,12 @@ import {
|
||||
import { Roles, JwtAuthGuard, RolesGuard } from '@modules/auth';
|
||||
import { EndpointRateLimit, EndpointRateLimitGuard } from '@modules/shared';
|
||||
import { ReindexAllCommand } from '../../application/commands/reindex-all/reindex-all.command';
|
||||
import { ReindexResult } from '../../application/commands/reindex-all/reindex-all.handler';
|
||||
import { type ReindexResult } from '../../application/commands/reindex-all/reindex-all.handler';
|
||||
import { GeoSearchQuery } from '../../application/queries/geo-search/geo-search.query';
|
||||
import { SearchPropertiesQuery } from '../../application/queries/search-properties/search-properties.query';
|
||||
import { SearchResult } from '../../domain/repositories/search.repository';
|
||||
import { GeoSearchDto } from '../dto/geo-search.dto';
|
||||
import { SearchPropertiesDto } from '../dto/search-properties.dto';
|
||||
import { type SearchResult } from '../../domain/repositories/search.repository';
|
||||
import { type GeoSearchDto } from '../dto/geo-search.dto';
|
||||
import { type SearchPropertiesDto } from '../dto/search-properties.dto';
|
||||
|
||||
@ApiTags('search')
|
||||
@Controller('search')
|
||||
|
||||
Reference in New Issue
Block a user