Initial commit: booking-ewa v1.0.0
Embedded Web App for EV charging slot bookings. Express backend with JWT auth and AMPECO Public API proxy. React SPA with booking CRUD, availability checking, and runtime design token theming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
export interface Booking {
|
||||
id: number;
|
||||
userId: number;
|
||||
locationId: number;
|
||||
startAt: string;
|
||||
endAt: string;
|
||||
status: BookingStatus;
|
||||
sessionId?: number | null;
|
||||
createdAt: string;
|
||||
lastUpdatedAt: string;
|
||||
bookedEvses?: { id: number }[];
|
||||
authorizedTokens?: { id: number; name: string }[];
|
||||
accessMethods?: string[];
|
||||
}
|
||||
|
||||
export type BookingStatus = 'accepted' | 'reserved' | 'completed' | 'cancelled' | 'no-show' | 'failed';
|
||||
|
||||
export interface BookingRequest {
|
||||
id: number;
|
||||
type: 'create' | 'update' | 'cancel';
|
||||
status: 'approved' | 'rejected';
|
||||
userId: number;
|
||||
locationId?: number;
|
||||
startAt?: string;
|
||||
endAt?: string;
|
||||
bookingId?: number;
|
||||
rejectionReason?: string;
|
||||
createdAt: string;
|
||||
lastUpdatedAt: string;
|
||||
}
|
||||
|
||||
export interface AvailabilitySlot {
|
||||
evseId: number;
|
||||
availableSlots: { startAt: string; endAt: string }[];
|
||||
}
|
||||
|
||||
export interface SessionData {
|
||||
userId: number | null;
|
||||
operatorId: number;
|
||||
appLanguage: string;
|
||||
appCountry: string;
|
||||
appTheme: 'LIGHT' | 'DARK';
|
||||
designTokens?: Record<string, string>;
|
||||
}
|
||||
Reference in New Issue
Block a user