192 lines
5.8 KiB
TypeScript
192 lines
5.8 KiB
TypeScript
import type { AuthPrincipal } from '../common/decorators/current-user.decorator';
|
|||
|
|
import { AgentService } from './agent.service';
|
||
|
|
import { CompleteReminderDto, CreateMeetingDto, CreateReminderDto } from './dto/agent.dto';
|
||
|
|
export declare class AgentController {
|
||
|
|
private readonly agentService;
|
||
|
|
constructor(agentService: AgentService);
|
||
|
|
categories(): Promise<{
|
||
|
|
usage: {
|
||
|
|
id: string;
|
||
|
|
title: string;
|
||
|
|
subtitle: string;
|
||
|
|
}[];
|
||
|
|
seasons: {
|
||
|
|
id: string;
|
||
|
|
title: string;
|
||
|
|
description: string;
|
||
|
|
}[];
|
||
|
|
}>;
|
||
|
|
profile(user: AuthPrincipal): Promise<{
|
||
|
|
id: string;
|
||
|
|
firstName: string;
|
||
|
|
lastName: string;
|
||
|
|
code: string;
|
||
|
|
levelLabel: string;
|
||
|
|
nextLevelLabel: string;
|
||
|
|
pointsToNext: number;
|
||
|
|
levelProgress: number;
|
||
|
|
phone: string;
|
||
|
|
customersCount: number;
|
||
|
|
ordersCount: number;
|
||
|
|
salesVolumeToman: number;
|
||
|
|
profitToman: number;
|
||
|
|
periodLabel: string;
|
||
|
|
}>;
|
||
|
|
customers(user: AuthPrincipal, q?: string, status?: string): Promise<{
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
contactName: string;
|
||
|
|
phone: string;
|
||
|
|
status: string;
|
||
|
|
avatarLetter: string;
|
||
|
|
avatarColor: string;
|
||
|
|
totalPurchaseToman: number;
|
||
|
|
orderCount: number;
|
||
|
|
averageOrderToman: number;
|
||
|
|
levelLabel: string;
|
||
|
|
firstPurchaseDate: string;
|
||
|
|
agentCode: string | undefined;
|
||
|
|
agentName: string | undefined;
|
||
|
|
}[]>;
|
||
|
|
customerDetail(user: AuthPrincipal, id: string): Promise<{
|
||
|
|
customer: {
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
contactName: string;
|
||
|
|
phone: string;
|
||
|
|
status: string;
|
||
|
|
avatarLetter: string;
|
||
|
|
avatarColor: string;
|
||
|
|
totalPurchaseToman: number;
|
||
|
|
orderCount: number;
|
||
|
|
averageOrderToman: number;
|
||
|
|
levelLabel: string;
|
||
|
|
firstPurchaseDate: string;
|
||
|
|
agentCode: string | null | undefined;
|
||
|
|
agentName: string | undefined;
|
||
|
|
};
|
||
|
|
orders: {
|
||
|
|
id: string;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
amountToman: number;
|
||
|
|
statusLabel: import("@prisma/client").$Enums.OrderStatus;
|
||
|
|
statusTone: "info";
|
||
|
|
date: string;
|
||
|
|
}[];
|
||
|
|
meetings: {
|
||
|
|
id: string;
|
||
|
|
customerId: string;
|
||
|
|
type: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
title: string;
|
||
|
|
description: string;
|
||
|
|
date: string;
|
||
|
|
time: string | undefined;
|
||
|
|
}[];
|
||
|
|
}>;
|
||
|
|
createMeeting(user: AuthPrincipal, dto: CreateMeetingDto): Promise<{
|
||
|
|
meeting: {
|
||
|
|
id: string;
|
||
|
|
createdAt: Date;
|
||
|
|
updatedAt: Date;
|
||
|
|
customerId: string;
|
||
|
|
agentId: string;
|
||
|
|
type: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
title: string;
|
||
|
|
description: string | null;
|
||
|
|
subject: string | null;
|
||
|
|
content: string | null;
|
||
|
|
date: string;
|
||
|
|
time: string | null;
|
||
|
|
};
|
||
|
|
reminder: {
|
||
|
|
id: string;
|
||
|
|
createdAt: Date;
|
||
|
|
updatedAt: Date;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
description: string | null;
|
||
|
|
date: string;
|
||
|
|
time: string;
|
||
|
|
note: string | null;
|
||
|
|
interactionType: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
completed: boolean;
|
||
|
|
completedAt: Date | null;
|
||
|
|
ownerId: string;
|
||
|
|
} | null;
|
||
|
|
}>;
|
||
|
|
reminders(user: AuthPrincipal, filter?: string): Promise<{
|
||
|
|
id: string;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
description: string;
|
||
|
|
time: string;
|
||
|
|
date: string;
|
||
|
|
interactionType: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
completed: boolean;
|
||
|
|
note: string | undefined;
|
||
|
|
customerName: string;
|
||
|
|
contactName: string;
|
||
|
|
avatarLetter: string;
|
||
|
|
avatarColor: string;
|
||
|
|
}[]>;
|
||
|
|
reminderDetail(user: AuthPrincipal, id: string): Promise<{
|
||
|
|
reminder: {
|
||
|
|
id: string;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
description: string;
|
||
|
|
time: string;
|
||
|
|
date: string;
|
||
|
|
interactionType: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
completed: boolean;
|
||
|
|
note: string | undefined;
|
||
|
|
};
|
||
|
|
customer: {
|
||
|
|
id: string;
|
||
|
|
name: string;
|
||
|
|
contactName: string;
|
||
|
|
phone: string;
|
||
|
|
avatarLetter: string;
|
||
|
|
avatarColor: string;
|
||
|
|
};
|
||
|
|
history: {
|
||
|
|
id: string;
|
||
|
|
type: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
title: string;
|
||
|
|
description: string;
|
||
|
|
date: string;
|
||
|
|
}[];
|
||
|
|
}>;
|
||
|
|
createReminder(user: AuthPrincipal, dto: CreateReminderDto): Promise<{
|
||
|
|
id: string;
|
||
|
|
createdAt: Date;
|
||
|
|
updatedAt: Date;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
description: string | null;
|
||
|
|
date: string;
|
||
|
|
time: string;
|
||
|
|
note: string | null;
|
||
|
|
interactionType: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
completed: boolean;
|
||
|
|
completedAt: Date | null;
|
||
|
|
ownerId: string;
|
||
|
|
}>;
|
||
|
|
completeReminder(user: AuthPrincipal, id: string, dto: CompleteReminderDto): Promise<{
|
||
|
|
id: string;
|
||
|
|
createdAt: Date;
|
||
|
|
updatedAt: Date;
|
||
|
|
customerId: string;
|
||
|
|
title: string;
|
||
|
|
description: string | null;
|
||
|
|
date: string;
|
||
|
|
time: string;
|
||
|
|
note: string | null;
|
||
|
|
interactionType: import("@prisma/client").$Enums.InteractionType;
|
||
|
|
completed: boolean;
|
||
|
|
completedAt: Date | null;
|
||
|
|
ownerId: string;
|
||
|
|
}>;
|
||
|
|
}
|