feat: P4.4 support REST (tickets/escalate/callbacks/queue admin) + kernel-client methods
8 routes under /v1/support (session-auth). RestClient gains createTicket/escalate/ listTickets/patchTicket/requestCallback/createQueue/joinQueue/setAvailability + Ticket/CallbackRequest types. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import { IsIn, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
const PRIORITIES = ['P0', 'P1', 'P2', 'P3', 'P4'] as const;
|
||||
const STATES = ['NEW', 'OPEN', 'PENDING_CUSTOMER', 'PENDING_INTERNAL', 'RESOLVED', 'CLOSED', 'CANCELLED'] as const;
|
||||
|
||||
export class CreateTicketDto {
|
||||
@IsString() subject!: string;
|
||||
@IsOptional() @IsIn(PRIORITIES) priority?: (typeof PRIORITIES)[number];
|
||||
@IsOptional() @IsString() threadId?: string;
|
||||
}
|
||||
|
||||
export class EscalateDto {
|
||||
@IsString() threadId!: string;
|
||||
@IsOptional() @IsString() subject?: string;
|
||||
}
|
||||
|
||||
export class PatchTicketDto {
|
||||
@IsIn(STATES) state!: (typeof STATES)[number];
|
||||
@IsOptional() @IsString() reason?: string;
|
||||
}
|
||||
|
||||
export class CallbackDto {
|
||||
@IsString() preferChannel!: string;
|
||||
@IsOptional() @IsString() preferredTime?: string;
|
||||
@IsOptional() @IsString() notes?: string;
|
||||
@IsOptional() @IsString() ticketId?: string;
|
||||
}
|
||||
|
||||
export class CreateQueueDto {
|
||||
@IsString() name!: string;
|
||||
}
|
||||
|
||||
export class AvailabilityDto {
|
||||
@IsString() state!: string;
|
||||
}
|
||||
Reference in New Issue
Block a user