Skip to content

Commit

Permalink
fix: update DTO type naming
Browse files Browse the repository at this point in the history
  • Loading branch information
yassinedorbozgithub committed Jan 11, 2025
1 parent 61f1590 commit 07fe025
Show file tree
Hide file tree
Showing 59 changed files with 106 additions and 113 deletions.
2 changes: 1 addition & 1 deletion api/src/chat/dto/block.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,6 @@ export class BlockUpdateDto extends PartialType(
trigger_channels?: string[];
}

export type BlockDTOMapActions = DtoConfig<{
export type BlockDto = DtoConfig<{
create: BlockCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/chat/dto/category.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export class CategoryCreateDto {

export class CategoryUpdateDto extends PartialType(CategoryCreateDto) {}

export type CategoryDTOMapActions = DtoConfig<{
export type CategoryDto = DtoConfig<{
create: CategoryCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/chat/dto/context-var.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ export class ContextVarCreateDto {

export class ContextVarUpdateDto extends PartialType(ContextVarCreateDto) {}

export type ContextVarDTOMapActions = DtoConfig<{
export type ContextVarDto = DtoConfig<{
create: ContextVarCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/chat/dto/conversation.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export class ConversationCreateDto {
next?: string[];
}

export type ConversationDtoMapActions = DtoConfig<{
export type ConversationDto = DtoConfig<{
create: ConversationCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/chat/dto/label.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ export class LabelCreateDto {

export class LabelUpdateDto extends PartialType(LabelCreateDto) {}

export type LabelDtoMapActions = DtoConfig<{
export type LabelDto = DtoConfig<{
create: LabelCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/chat/dto/subscriber.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ export class SubscriberCreateDto {

export class SubscriberUpdateDto extends PartialType(SubscriberCreateDto) {}

export type UserDtoMapActions = DtoConfig<{
export type UserDto = DtoConfig<{
create: SubscriberCreateDto;
}>;
8 changes: 2 additions & 6 deletions api/src/chat/repositories/block.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ import { LoggerService } from '@/logger/logger.service';
import { BaseRepository, DeleteResult } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import {
BlockCreateDto,
BlockDTOMapActions,
BlockUpdateDto,
} from '../dto/block.dto';
import { BlockCreateDto, BlockDto, BlockUpdateDto } from '../dto/block.dto';
import {
Block,
BLOCK_POPULATE,
Expand All @@ -39,7 +35,7 @@ export class BlockRepository extends BaseRepository<
Block,
BlockPopulate,
BlockFull,
BlockDTOMapActions
BlockDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/repositories/category.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Document, Model, Query } from 'mongoose';
import { BaseRepository, DeleteResult } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { CategoryDTOMapActions } from '../dto/category.dto';
import { CategoryDto } from '../dto/category.dto';
import { Category } from '../schemas/category.schema';
import { BlockService } from '../services/block.service';

Expand All @@ -23,7 +23,7 @@ export class CategoryRepository extends BaseRepository<
Category,
never,
never,
CategoryDTOMapActions
CategoryDto
> {
private readonly blockService: BlockService;

Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/repositories/context-var.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { Document, Model, Query } from 'mongoose';
import { BaseRepository, DeleteResult } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { ContextVarDTOMapActions } from '../dto/context-var.dto';
import { ContextVarDto } from '../dto/context-var.dto';
import { ContextVar } from '../schemas/context-var.schema';
import { BlockService } from '../services/block.service';

Expand All @@ -28,7 +28,7 @@ export class ContextVarRepository extends BaseRepository<
ContextVar,
never,
never,
ContextVarDTOMapActions
ContextVarDto
> {
private readonly blockService: BlockService;

Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/repositories/conversation.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Model } from 'mongoose';

import { BaseRepository } from '@/utils/generics/base-repository';

import { ConversationDtoMapActions } from '../dto/conversation.dto';
import { ConversationDto } from '../dto/conversation.dto';
import {
Conversation,
CONVERSATION_POPULATE,
Expand All @@ -26,7 +26,7 @@ export class ConversationRepository extends BaseRepository<
Conversation,
ConversationPopulate,
ConversationFull,
ConversationDtoMapActions
ConversationDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/repositories/label.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Document, Model, Query } from 'mongoose';
import { BaseRepository, DeleteResult } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { LabelDtoMapActions } from '../dto/label.dto';
import { LabelDto } from '../dto/label.dto';
import {
Label,
LABEL_POPULATE,
Expand All @@ -28,7 +28,7 @@ export class LabelRepository extends BaseRepository<
Label,
LabelPopulate,
LabelFull,
LabelDtoMapActions
LabelDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/repositories/subscriber.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { BaseRepository } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { SubscriberUpdateDto, UserDtoMapActions } from '../dto/subscriber.dto';
import { SubscriberUpdateDto, UserDto } from '../dto/subscriber.dto';
import {
Subscriber,
SUBSCRIBER_POPULATE,
Expand All @@ -34,7 +34,7 @@ export class SubscriberRepository extends BaseRepository<
Subscriber,
SubscriberPopulate,
SubscriberFull,
UserDtoMapActions
UserDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/seeds/category.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseSeeder } from '@/utils/generics/base-seeder';

import { CategoryDTOMapActions } from '../dto/category.dto';
import { CategoryDto } from '../dto/category.dto';
import { CategoryRepository } from '../repositories/category.repository';
import { Category } from '../schemas/category.schema';

Expand All @@ -19,7 +19,7 @@ export class CategorySeeder extends BaseSeeder<
Category,
never,
never,
CategoryDTOMapActions
CategoryDto
> {
constructor(private readonly categoryRepository: CategoryRepository) {
super(categoryRepository);
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/seeds/context-var.seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseSeeder } from '@/utils/generics/base-seeder';

import { ContextVarDTOMapActions } from '../dto/context-var.dto';
import { ContextVarDto } from '../dto/context-var.dto';
import { ContextVarRepository } from '../repositories/context-var.repository';
import { ContextVar } from '../schemas/context-var.schema';

Expand All @@ -19,7 +19,7 @@ export class ContextVarSeeder extends BaseSeeder<
ContextVar,
never,
never,
ContextVarDTOMapActions
ContextVarDto
> {
constructor(private readonly contextVarRepository: ContextVarRepository) {
super(contextVarRepository);
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/block.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { SettingService } from '@/setting/services/setting.service';
import { BaseService } from '@/utils/generics/base-service';
import { getRandom } from '@/utils/helpers/safeRandom';

import { BlockDTOMapActions } from '../dto/block.dto';
import { BlockDto } from '../dto/block.dto';
import { BlockRepository } from '../repositories/block.repository';
import { Block, BlockFull, BlockPopulate } from '../schemas/block.schema';
import { Context } from '../schemas/types/context';
Expand All @@ -40,7 +40,7 @@ export class BlockService extends BaseService<
Block,
BlockPopulate,
BlockFull,
BlockDTOMapActions
BlockDto
> {
constructor(
readonly repository: BlockRepository,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/category.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseService } from '@/utils/generics/base-service';

import { CategoryDTOMapActions } from '../dto/category.dto';
import { CategoryDto } from '../dto/category.dto';
import { CategoryRepository } from '../repositories/category.repository';
import { Category } from '../schemas/category.schema';

Expand All @@ -19,7 +19,7 @@ export class CategoryService extends BaseService<
Category,
never,
never,
CategoryDTOMapActions
CategoryDto
> {
constructor(readonly repository: CategoryRepository) {
super(repository);
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/context-var.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseService } from '@/utils/generics/base-service';

import { ContextVarDTOMapActions } from '../dto/context-var.dto';
import { ContextVarDto } from '../dto/context-var.dto';
import { ContextVarRepository } from '../repositories/context-var.repository';
import { Block, BlockFull } from '../schemas/block.schema';
import { ContextVar } from '../schemas/context-var.schema';
Expand All @@ -20,7 +20,7 @@ export class ContextVarService extends BaseService<
ContextVar,
never,
never,
ContextVarDTOMapActions
ContextVarDto
> {
constructor(readonly repository: ContextVarRepository) {
super(repository);
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/conversation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import EventWrapper from '@/channel/lib/EventWrapper';
import { LoggerService } from '@/logger/logger.service';
import { BaseService } from '@/utils/generics/base-service';

import { ConversationDtoMapActions } from '../dto/conversation.dto';
import { ConversationDto } from '../dto/conversation.dto';
import { VIEW_MORE_PAYLOAD } from '../helpers/constants';
import { ConversationRepository } from '../repositories/conversation.repository';
import { Block, BlockFull } from '../schemas/block.schema';
Expand All @@ -32,7 +32,7 @@ export class ConversationService extends BaseService<
Conversation,
ConversationPopulate,
ConversationFull,
ConversationDtoMapActions
ConversationDto
> {
constructor(
readonly repository: ConversationRepository,
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/label.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseService } from '@/utils/generics/base-service';

import { LabelDtoMapActions } from '../dto/label.dto';
import { LabelDto } from '../dto/label.dto';
import { LabelRepository } from '../repositories/label.repository';
import { Label, LabelFull, LabelPopulate } from '../schemas/label.schema';

Expand All @@ -19,7 +19,7 @@ export class LabelService extends BaseService<
Label,
LabelPopulate,
LabelFull,
LabelDtoMapActions
LabelDto
> {
constructor(readonly repository: LabelRepository) {
super(repository);
Expand Down
4 changes: 2 additions & 2 deletions api/src/chat/services/subscriber.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { SocketRequest } from '@/websocket/utils/socket-request';
import { SocketResponse } from '@/websocket/utils/socket-response';
import { WebsocketGateway } from '@/websocket/websocket.gateway';

import { SubscriberUpdateDto, UserDtoMapActions } from '../dto/subscriber.dto';
import { SubscriberUpdateDto, UserDto } from '../dto/subscriber.dto';
import { SubscriberRepository } from '../repositories/subscriber.repository';
import {
Subscriber,
Expand All @@ -41,7 +41,7 @@ export class SubscriberService extends BaseService<
Subscriber,
SubscriberPopulate,
SubscriberFull,
UserDtoMapActions
UserDto
> {
private readonly gateway: WebsocketGateway;

Expand Down
2 changes: 1 addition & 1 deletion api/src/cms/dto/content.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ export class ContentCreateDto {

export class ContentUpdateDto extends PartialType(ContentCreateDto) {}

export type ContentDTOMapActions = DtoConfig<{
export type ContentDto = DtoConfig<{
create: ContentCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/cms/dto/contentType.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export class ContentTypeCreateDto {

export class ContentTypeUpdateDto extends PartialType(ContentTypeCreateDto) {}

export type ContentTypeDtoMapActions = DtoConfig<{
export type ContentTypeDto = DtoConfig<{
create: ContentTypeCreateDto;
}>;
2 changes: 1 addition & 1 deletion api/src/cms/dto/menu.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ export class MenuCreateDto {

export class MenuQueryDto extends PartialType(MenuCreateDto) {}

export type MenuDTOMapActions = DtoConfig<{
export type MenuDto = DtoConfig<{
create: MenuCreateDto;
}>;
4 changes: 2 additions & 2 deletions api/src/cms/repositories/content-type.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { BlockService } from '@/chat/services/block.service';
import { BaseRepository, DeleteResult } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { ContentTypeDtoMapActions } from '../dto/contentType.dto';
import { ContentTypeDto } from '../dto/contentType.dto';
import { ContentType } from '../schemas/content-type.schema';
import { Content } from '../schemas/content.schema';

Expand All @@ -24,7 +24,7 @@ export class ContentTypeRepository extends BaseRepository<
ContentType,
never,
never,
ContentTypeDtoMapActions
ContentTypeDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/cms/repositories/content.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
import { BaseRepository } from '@/utils/generics/base-repository';
import { TFilterQuery } from '@/utils/types/filter.types';

import { ContentDTOMapActions } from '../dto/content.dto';
import { ContentDto } from '../dto/content.dto';
import {
Content,
CONTENT_POPULATE,
Expand All @@ -34,7 +34,7 @@ export class ContentRepository extends BaseRepository<
Content,
ContentPopulate,
ContentFull,
ContentDTOMapActions
ContentDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/cms/repositories/menu.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Model } from 'mongoose';

import { BaseRepository } from '@/utils/generics/base-repository';

import { MenuDTOMapActions } from '../dto/menu.dto';
import { MenuDto } from '../dto/menu.dto';
import {
Menu,
MENU_POPULATE,
Expand All @@ -28,7 +28,7 @@ export class MenuRepository extends BaseRepository<
Menu,
MenuPopulate,
MenuFull,
MenuDTOMapActions
MenuDto
> {
constructor(
readonly eventEmitter: EventEmitter2,
Expand Down
4 changes: 2 additions & 2 deletions api/src/cms/services/content-type.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Injectable } from '@nestjs/common';

import { BaseService } from '@/utils/generics/base-service';

import { ContentTypeDtoMapActions } from '../dto/contentType.dto';
import { ContentTypeDto } from '../dto/contentType.dto';
import { ContentTypeRepository } from '../repositories/content-type.repository';
import { ContentType } from '../schemas/content-type.schema';

Expand All @@ -19,7 +19,7 @@ export class ContentTypeService extends BaseService<
ContentType,
never,
never,
ContentTypeDtoMapActions
ContentTypeDto
> {
constructor(readonly repository: ContentTypeRepository) {
super(repository);
Expand Down
Loading

0 comments on commit 07fe025

Please sign in to comment.