mirror of
https://github.com/holidayapi/holidayapi-node.git
synced 2025-06-21 12:36:33 +00:00
Suggested type updates
This commit is contained in:
parent
bbda365fe7
commit
36472e9577
1 changed files with 5 additions and 5 deletions
10
src/types.ts
10
src/types.ts
|
@ -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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue