feat: add workday endpoint

Added support for our latest endpoint, which calculates the workday a
given number of business days into the future from the given date for
the given country.

Also:
* perf: updated dependencies
* ci: pinned eslint to 7.2.x due to airbnb incompatibility with 7.3.x.
* ci: tweaked / improved eslint rules a bit.
* refactor: updated types to use `;` and include weekday response.
* docs: added example for new endpoint.
This commit is contained in:
Josh Sherman 2020-06-20 11:06:59 -05:00
parent 07988d8c71
commit 2230488d14
10 changed files with 377 additions and 177 deletions

View file

@ -1,4 +1,4 @@
import { CountriesRequest, CountriesResponse, HolidaysResponse, HolidaysRequest, LanguagesRequest, LanguagesResponse } from './types';
import { CountriesRequest, CountriesResponse, HolidaysRequest, HolidaysResponse, LanguagesRequest, LanguagesResponse, WorkdayRequest, WorkdayResponse } from './types';
export declare class HolidayAPI {
baseUrl: string;
key: string;
@ -11,4 +11,5 @@ export declare class HolidayAPI {
countries(request?: CountriesRequest): Promise<CountriesResponse>;
holidays(request?: HolidaysRequest): Promise<HolidaysResponse>;
languages(request?: LanguagesRequest): Promise<LanguagesResponse>;
workday(request?: WorkdayRequest): Promise<WorkdayResponse>;
}