-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* delete main Co-authored-by: Tigua002 <Tigua002@users.noreply.github.com> * revert commit: delete main Co-authored-by: Tigua002 <Tigua002@users.noreply.github.com> * implement list usage summary Co-authored-by: Tigua002 <Tigua002@users.noreply.github.com> * add method listUsageSummary * format * put in proper spot * convert to type import * rename to match method * update path name * lint --------- Co-authored-by: Tigua002 <Tigua002@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { z } from 'zod'; | ||
|
||
export interface ListUsageSummaryInput { | ||
// the id of the vehicle | ||
vehicle_id?: string; | ||
|
||
/** The period cannot be longer than 3 months */ | ||
date_from: Date; | ||
|
||
/** The period cannot be longer than 3 months */ | ||
date_to: Date; | ||
} | ||
|
||
export const listUsageSummaryResponseSchema = z.object({ | ||
PrivateUsage: z.object({ | ||
DistanceDrivenInMeter: z.number(), | ||
TotalTollStationsPassed: z.number(), | ||
}), | ||
CorporateUsageSummary: z.object({ | ||
DistanceDrivenInMeter: z.number(), | ||
TotalTollStationsPassed: z.number(), | ||
}), | ||
}); | ||
|
||
export type ListUsageSummaryResponse = z.infer< | ||
typeof listUsageSummaryResponseSchema | ||
>; |