UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

111 lines 2.88 kB
export declare enum SupportStatus { ABERTO = "aberto", RESPONDIDO = "respondido", ENCERRADO = "encerrado" } export declare enum SupportCategory { ACESSO = "acesso", TECNICO = "tecnico", OUTROS = "outros" } export type TicketStatus = SupportStatus; export type ProblemType = SupportCategory | null; export type TabType = 'criar-pedido' | 'historico'; export interface SupportResponse { id: string; receivedAt: string; message: string; } export interface SupportTicket { id: string; title: string; status: TicketStatus; createdAt: string; category: ProblemType; description?: string; response?: SupportResponse; } export declare const getStatusBadgeAction: (status: SupportStatus) => "success" | "error" | "warning" | "info"; export declare const getStatusText: (status: SupportStatus) => string; export declare const getCategoryText: (category: SupportCategory | null) => string; export interface CreateSupportTicketRequest { subject: string; description: string; type: string; } export interface CreateSupportTicketResponse { message: string; data: { id: string; ownerId: string; type: string; email: string; subject: string; description: string; status: string; createdAt: string; updatedAt: string; }; } export interface SupportTicketAPI { id: string; ownerId: string; type: string; email: string; subject: string; description: string; status: string; createdAt: string; updatedAt: string; } export interface SupportPagination { page: number; limit: number; total: number; totalPages: number; hasNext: boolean; hasPrev: boolean; } export interface GetSupportTicketsResponse { message: string; data: { support: SupportTicketAPI[]; pagination: SupportPagination; }; } export interface SupportAnswerAPI { id: string; userId: string; supportId: string; answer: string; read: boolean; createdAt: string; updatedAt: string; } export interface GetSupportAnswersResponse { message: string; data: SupportAnswerAPI[]; } export interface SubmitSupportAnswerRequest { userId: string; supportId: string; answer: string; } export interface SubmitSupportAnswerResponse { message: string; data: SupportAnswerAPI; } export declare const mapApiStatusToInternal: (apiStatus: string) => SupportStatus; export declare const mapInternalStatusToApi: (internalStatus: SupportStatus) => string; export interface SupportApiClient { get: <T>(url: string) => Promise<{ data: T; }>; post: <T>(url: string, data?: unknown) => Promise<{ data: T; }>; patch: <T>(url: string, data?: unknown) => Promise<{ data: T; }>; } //# sourceMappingURL=support.d.ts.map