@jphil/bookwhen-client 0.2.6 → 0.3.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.
@@ -1,36 +0,0 @@
1
- export interface EventImage {
2
- image_url: string;
3
- alt_ratio_16x9_1x_url: string;
4
- alt_ratio_16x9_2x_url: string;
5
- alt_ratio_16x9_3x_url: string;
6
- alt_ratio_4x3_1x_url: string;
7
- alt_ratio_4x3_2x_url: string;
8
- alt_ratio_4x3_3x_url: string;
9
- alt_ratio_1x1_1x_url: string;
10
- alt_ratio_1x1_2x_url: string;
11
- alt_ratio_1x1_3x_url: string;
12
- }
13
- export interface EventAttributes {
14
- title: string;
15
- details: string;
16
- all_day: boolean;
17
- start_at: string;
18
- end_at: string;
19
- attendee_limit: number;
20
- attendee_count: number;
21
- waiting_list: boolean;
22
- max_tickets_per_booking: number;
23
- tags: string[];
24
- event_image: EventImage;
25
- }
26
- export interface BookwhenEvent {
27
- id: string;
28
- type: string;
29
- attributes: EventAttributes;
30
- }
31
- export interface EventsResponse {
32
- data: BookwhenEvent[];
33
- }
34
- export interface EventResponse {
35
- data: BookwhenEvent;
36
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=EventTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EventTypes.js","sourceRoot":"","sources":["../../../src/services/event/EventTypes.ts"],"names":[],"mappings":""}
@@ -1,9 +0,0 @@
1
- export interface HttpStatus {
2
- code: number;
3
- message: string;
4
- }
5
- export type Resource = string;
6
- export type Resources = Resource[];
7
- export interface Filters {
8
- [key: string]: string | string[] | boolean;
9
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=GlobalTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GlobalTypes.js","sourceRoot":"","sources":["../../src/types/GlobalTypes.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import type { HttpStatus } from '../types/GlobalTypes.js';
2
- /**
3
- * Handles errors for service methods
4
- * @param error The error object caught in service methods.
5
- * @param statusCodes General service-level status codes and messages.
6
- * @param methodErrors Optional method-specific error messages.
7
- */
8
- export declare function handleServiceHTTPErrors(error: any, statusCodes: Record<number, HttpStatus>, methodErrors?: Record<number, HttpStatus>): never;
@@ -1,19 +0,0 @@
1
- /**
2
- * Handles errors for service methods
3
- * @param error The error object caught in service methods.
4
- * @param statusCodes General service-level status codes and messages.
5
- * @param methodErrors Optional method-specific error messages.
6
- */
7
- export function handleServiceHTTPErrors(error, statusCodes, methodErrors = {}) {
8
- if (error.response) {
9
- const status = error.response.status;
10
- // First, check for method-specific errors, then fall back to general service errors
11
- const errorMessage = methodErrors[status]?.message || statusCodes[status]?.message || `Unhandled service error with status code: ${status}`;
12
- throw new Error(errorMessage);
13
- }
14
- else {
15
- // If no response was received, this is likely a serious client or network issue
16
- throw new Error("An unexpected network or client error occurred, with no response property.");
17
- }
18
- }
19
- //# sourceMappingURL=http-utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-utils.js","sourceRoot":"","sources":["../../src/utils/http-utils.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAU,EAAE,WAAuC,EAAE,eAA2C,EAAE;IACxI,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;QACrC,oFAAoF;QACpF,MAAM,YAAY,GAAG,YAAY,CAAC,MAAM,CAAC,EAAE,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,EAAE,OAAO,IAAI,6CAA6C,MAAM,EAAE,CAAC;QAC5I,MAAM,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;SAAM,CAAC;QACJ,gFAAgF;QAChF,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;IAClG,CAAC;AACH,CAAC"}