@seatmap-fyi/api-client 0.0.0-stage → 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ export interface ConfigurationParameters {
2
+ readonly basePath: string;
3
+ readonly fetchApi?: typeof globalThis.fetch;
4
+ }
5
+ export declare class Configuration {
6
+ readonly basePath: string;
7
+ readonly fetchApi: typeof globalThis.fetch;
8
+ constructor(parameters: ConfigurationParameters);
9
+ }
@@ -0,0 +1,8 @@
1
+ export class Configuration {
2
+ basePath;
3
+ fetchApi;
4
+ constructor(parameters) {
5
+ this.basePath = parameters.basePath;
6
+ this.fetchApi = parameters.fetchApi ?? globalThis.fetch;
7
+ }
8
+ }
@@ -0,0 +1,5 @@
1
+ export declare class ApiError extends Error {
2
+ readonly status: number;
3
+ readonly response: Response;
4
+ constructor(response: Response);
5
+ }
@@ -0,0 +1,10 @@
1
+ export class ApiError extends Error {
2
+ status;
3
+ response;
4
+ constructor(response) {
5
+ super(`API request failed with HTTP ${response.status}.`);
6
+ this.name = "ApiError";
7
+ this.status = response.status;
8
+ this.response = response;
9
+ }
10
+ }