UNPKG

@alba-cars/common-modules

Version:

A package containing DTOs, validation classes and common modules and interfaces for Alba Cars

156 lines (155 loc) 5.02 kB
type EndpointFunction = (_id: number | string) => string; interface BaseEndpoint { getAll: string | EndpointFunction; create: string | EndpointFunction; getOne: EndpointFunction; deleteOne: EndpointFunction; updateOne: EndpointFunction; } interface VehicleEndpoints extends BaseEndpoint { getSimilar: EndpointFunction; getOneBySlug: EndpointFunction; getOneByRef: EndpointFunction; publishVehicle: EndpointFunction; unpublishVehicle: EndpointFunction; reserveVehicle: EndpointFunction; selfReserveVehicle: EndpointFunction; markVehicleSold: EndpointFunction; markVehicleDraft: EndpointFunction; } interface BlogEndpoints extends BaseEndpoint { getOneBySlug: EndpointFunction; } type MetaEndpoints = BaseEndpoint & { aiGenerateTitle: EndpointFunction; aiGenerateDescription: EndpointFunction; aiGenerateKeyword: EndpointFunction; aiGenerateVehicleDescription: EndpointFunction; }; type DepositEndpoints = BaseEndpoint & { initiateRefund: string | EndpointFunction; getOrCreateUserInformation: string; }; type UserEndpoints = BaseEndpoint & { changeProfilePicture: EndpointFunction; deleteProfilePicture: EndpointFunction; }; type TicketEndpoints = BaseEndpoint & { getMyTickets: string; getUserTickets: EndpointFunction; getAgentTickets: EndpointFunction; addMessage: EndpointFunction; addDocument: EndpointFunction; getDocuments: EndpointFunction; reopenTicket: EndpointFunction; sendToKissFlow: string; }; type ReviewEndpoints = BaseEndpoint & { changeReviewShowPublic: EndpointFunction; }; type VehicleFeatureEndpoints = BaseEndpoint & { changeIcon: EndpointFunction; }; type DealDriveEndpoints = BaseEndpoint & { getAllMakes: EndpointFunction; getAllModels: EndpointFunction; }; type FinanceEligibilityRequestEndpoints = BaseEndpoint & { updateStatus: EndpointFunction; }; type BankValuationRequestEndpoints = BaseEndpoint & { approveValuation: EndpointFunction; rejectValuation: EndpointFunction; overridePayment: EndpointFunction; updateStatus: EndpointFunction; previewCertificatePdf: EndpointFunction; reissueCertificate: EndpointFunction; getCertificateEditableData: EndpointFunction; estimate: string; rangeEstimate: string; getStats: string; notifyAboutExistingLead: string; getRequestStatus: EndpointFunction; checkRequestIsIncomplete: EndpointFunction; sendContinuationReminder: EndpointFunction; }; type ColorEndpoints = BaseEndpoint & { list: string; getBySlug: (slug: string) => string; }; type ExchangeCarRequestEndpoints = { getAll: string; create: string; getOne: EndpointFunction; updateOne: EndpointFunction; deleteOne: EndpointFunction; }; type DubiCarsEndpoints = { getAdByDubiCarsId: EndpointFunction; checkVehicleAdStatus: EndpointFunction; getAvailableModelsForMake: (make: string) => string; postAd: string; doAction: (action: "pause" | "activate" | "refresh" | "sold" | "premium" | "remove-premium") => string; deleteAd: EndpointFunction; deleteAdByVehicleId: EndpointFunction; }; type APIEndpointType = { vehicle: VehicleEndpoints; blogs: BlogEndpoints; vehicleFinance: BaseEndpoint; TestDrive: BaseEndpoint; vehicleMake: BaseEndpoint & { getOneBySlug: (slug: string) => string; }; vehicleModel: BaseEndpoint; vehicleMeta: MetaEndpoints; vehicleInspection: BaseEndpoint; vehicleOrder: BaseEndpoint; vehicleFeatures: VehicleFeatureEndpoints; vehicleFeatureCategories: BaseEndpoint; vehicleType: BaseEndpoint; payment: BaseEndpoint; deposit: DepositEndpoints; agents: BaseEndpoint; showroomVisit: BaseEndpoint; sellCarRequest: BaseEndpoint & { notifyAboutExistingLead: string; }; financeEligibilityRequest: FinanceEligibilityRequestEndpoints; vehicleReservations: BaseEndpoint; languages: BaseEndpoint; leads: BaseEndpoint; leadPreferences: BaseEndpoint; googleReview: ReviewEndpoints; tickets: TicketEndpoints; user: UserEndpoints; faq: BaseEndpoint; dealDrive: DealDriveEndpoints; bankValuationRequest: BankValuationRequestEndpoints; exchangeCarRequest: ExchangeCarRequestEndpoints; dubiCars: DubiCarsEndpoints; colors: ColorEndpoints; bankValuationResult: BaseEndpoint; bank: BaseEndpoint; }; export declare const API_ENDPOINTS: APIEndpointType; export declare const UTIL_ENDPOINTS: { media: { createS3Url: string; preprocessMediaUrl: string; removeS3Media: string; removeVehicleMedia: string; removeByIdentifier: string; compressImage: string; }; }; export declare const AUTH_ENDPOINTS: { login: string; register: string; refreshAccessToken: string; sendPhoneVerificationCode: string; verifyPhoneAndLogin: string; verifyAnyPhoneNumber: string; checkPhoneNumberExists: string; }; export {};