Suggested type updates

This commit is contained in:
Marrtin Rylander 2022-01-12 12:54:00 +01:00
parent bbda365fe7
commit 36472e9577

View file

@ -7,7 +7,7 @@
export type Endpoint = 'countries' | 'holidays' | 'languages' | 'workday' | 'workdays'; export type Endpoint = 'countries' | 'holidays' | 'languages' | 'workday' | 'workdays';
type Weekday = { export type Weekday = {
name: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday'; name: 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday';
numeric: 1 | 2 | 3 | 4 | 5 | 6 | 7; numeric: 1 | 2 | 3 | 4 | 5 | 6 | 7;
}; };
@ -55,7 +55,7 @@ export type WorkdaysRequest = Request & {
export type Response = { export type Response = {
requests: { requests: {
available: number; available: number;
resets: Date; resets: string;
used: number; used: number;
}; };
status: number; status: number;
@ -88,9 +88,9 @@ export type CountriesResponse = Response & {
export type HolidaysResponse = Response & { export type HolidaysResponse = Response & {
holidays?: { holidays?: {
country: string; country: string;
date: Date; date: string;
name: string; name: string;
observed: Date; observed: string;
public: boolean; public: boolean;
uuid: string; uuid: string;
subdivisions?: string[]; subdivisions?: string[];
@ -106,7 +106,7 @@ export type LanguagesResponse = Response & {
export type WorkdayResponse = Response & { export type WorkdayResponse = Response & {
workday?: { workday?: {
date: Date; date: string;
weekday: Weekday; weekday: Weekday;
} }
}; };