import { QueryParams } from './fetchResponse.type'; import { MultiSelectOption } from './options.type'; export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH'; export type StatusTicket = 'Open' | 'On Verification' | 'Request Cancel' | 'On Progress' | 'Need Confirmation' | 'Closed' | 'Cancel Ticket'; export type ExecuteEndpointResponse = { status: number; message: string; data: { pingServerMs: number; responseTimeMs: number; statusString: string; response: unknown; }; }; export interface EndpointDetailResponse { data: EndpointDetail; status: number; message: string; } export interface EndpointDetail { _id: string; module: { _id: string; name: string; }; subModule: { _id: string; name: string; }; api: string; type: 'json' | 'form-data'; endpoint: { method: string; url: string; }; pathVariables: string[]; query: string[]; jsonBody: string; formDataBody: FormDataBody[]; savedBody: Record; savedPathVariables: Record; savedQueryParams: Record; apiSpecResponse: string; } export interface FormDataBody { _id: string; key: string; type: 'text' | 'file'; isMandatory: boolean; } export interface ExecuteEndpointQueryParams extends QueryParams { pathVariables: string; queryParams: string; } export type ExecuteEndpointBody = string | FormData; export type InputContent = { item: Record; field: string; value: string | number; tableName: string; subModuleId: string; }; export interface RowReorderEvent { item: { _id: string; }; fromIndex: number; toIndex: number; } export interface QcMember { _id: string; nickName: string; fullName: string; teams: string[]; } export interface User { _id: string; modul: string; method: string; subModule: string; module: string; platform: string; jumlahTestCase: string; qc: string; lastModified: string; } export interface BugDetail { actualResult: string; testSteps: string; attachmentApplied: string; severity: string; priority: string; status: string; _id: string; testCaseId: string; e2eTestCaseId: string; } export interface TableDataItem { _id: string; attachments: string[]; status: string; name: string; testCaseId: string; caseId: string; type: string; testCase: string; steps: string; stepsDescription: string; expectedResult: string; precondition: string; postcondition: string; category: { name: string; }; editedById: string; lastUpdate: string; bugDetails: BugDetail[]; } export interface ErrorResponse { response: { data: { message: string; }; }; } export interface ProjectQC { _id: string; type: string; testCase: string; testCaseId: string; caseID: string; stage: string; status: string; finishedAt: string; profilePictureBig: string; profilePicture: string; createdAt: string; updatedAt: string; platform: string; module: { _id: string; name: string; initialName: string; }; subModule: { _id: string; name: string; status: string; }; qc: { _id: string; key: number; profilePictureBig: string; profilePictureMedium: string; profilePictureSmall: string; fullName: string; nickName: string; }; totalTestCases: number; bugDetails: { _id: string; e2eTestCaseId: string; actualResult: string; testSteps: string; attachmentApplied: string; severity: string; priority: string; status: string; testCaseId: string; }[]; progress: string; } export interface Performance { _id: string; task: string; pingServerMs: number; responseTimeMs: { previous: number; latest: number; }; totalRecords: number | null; qc: { _id: string; key: number; profilePictureBig: string; profilePictureMedium: string; profilePictureSmall: string; fullName: string; nickName: string; division: string; position: string; teams: string[]; email: string; }; createdAt: string; updatedAt: string; url: string; project: { _id: string; name: string; initialName: string; }; module: { _id: string; name: string; initial: string; }; subModule: { _id: string; }; method: string; api: string; apiUrl: string; apiAndMethod: string; } export interface GroupingListData { _id: string; task: string; pingServerMs: number | null; responseTimeMs: { previous: number | null; latest: number | null; }; totalRecords: number | null; qc: QCInfo; attachment: string[]; createdAt: string | Date; updatedAt: string | Date; project: Project; module: Module; subModule: SubModule; method: HttpMethod; api: string; apiUrl: string; } export interface ResponseTimeData { _id: string; task: string; pingServerMs: number; responseTimeMs: { previous: number | null; latest: number | null; }; totalRecords: number | null; qc: QCInfo; createdAt: string; updatedAt: string; url: string; attachments: string[]; project: Project; module: Module; subModule: SubModule; method: string; api: string; apiUrl: string; apiAndMethod: string; } export interface ApiBugData { _id: string; task: string; ticket: Ticket; pingServerMs: number | null; responseTimeMs: { previous: number | null; latest: number | null; }; totalRecords: number | null; qc: QCInfo; createdAt: string; updatedAt: string; url: string; attachments: string[]; subModule: SubModule; project: Project; module: Module; method: string; api: string; apiUrl: string; apiAndMethod: string; } export interface GroupingData { totalApi: number; method: string; } export interface EndPointData { _id: string; module: { _id: string; name: string; }; subModule: { _id: string; name: string; }; api: string; type: 'json' | 'form-data'; endpoint: { method: string; url: string; }; pathVariables: string[]; query: string[]; jsonBody: string; formDataBody: FormDataBody[]; savedBody: Record; savedPathVariables: Record; savedQueryParams: Record; apiSpecResponse: string; } export interface FormDataBody { _id: string; key: string; type: 'text' | 'file'; isMandatory: boolean; } export interface ModifiedData { keys: string; value: unknown; } export interface EndPointResponse { status: number; message: string; data: EndPointData; modifiedData: ModifiedData[]; } export interface ChangeEndpointBuggedStatusBody { endpointIds: string[]; isBugged: boolean; type?: 'performance' | 'reportedBug'; editorObject?: string; } export interface RunEndpointTestData { pingServerMs: number; responseTimeMs: number; statusString: string; response: Record; } export interface RunEndpointTestResponse { status: number; message: string; data: RunEndpointTestData; } export interface ExecuteMultipleEndPointResponse { status: number; message: string; data: { success: ApiStatus[]; failed: ApiStatus[]; }; } export interface AllPBIResponse { status: number; message: string; data: { totalRecords: number; data: AllPBIData[]; }; } export interface AllPBIData { _id: string; name: string; sprint: Sprint; status: string; category: string; createdBy: { _id: string; teams: string[]; }; createdAt: string | Date; updatedAt: string | Date; platform: string; subModules: SubModule[]; qc: QCInfo; } export interface AllPBIOptionsQueryParams { status?: 'pending' | 'finished'; platform?: 'web' | 'mobile'; category?: boolean; subModule?: boolean; qc?: boolean; } export interface AllPBIOptionResponse { status: number; message: string; data: AllPBIOptionData; } export interface AllPBIOptionData { category?: MultiSelectOption[]; subModule?: MultiSelectOption[]; qc?: MultiSelectOption[]; } interface Sprint { _id: string; } interface ApiStatus { id: string; apiName: string; url: string; method: string; message: string; } interface QCInfo { _id: string; key: number; profilePictureBig: string; profilePictureMedium: string; profilePictureSmall: string; fullName: string; nickName: string; division: string; position: string; teams: string[]; email: string; } interface Ticket { _id: string; status: StatusTicket; } interface Project { _id: string; name: string; initialName: string; } interface Module { name: string; initial: string; _id: string; } interface SubModule { _id: string; name: string; } export {};