orita-sdk 1.0.0

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.
package/dist/index.cjs ADDED
@@ -0,0 +1,299 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ OritaAuthError: () => OritaAuthError,
24
+ OritaClient: () => OritaClient,
25
+ OritaError: () => OritaError,
26
+ OritaNotFoundError: () => OritaNotFoundError,
27
+ OritaSlotUnavailableError: () => OritaSlotUnavailableError
28
+ });
29
+ module.exports = __toCommonJS(index_exports);
30
+
31
+ // src/errors.ts
32
+ var OritaError = class extends Error {
33
+ constructor(message, statusCode, response) {
34
+ super(message);
35
+ this.name = "OritaError";
36
+ this.statusCode = statusCode;
37
+ this.response = response;
38
+ const ErrCtor = Error;
39
+ if (ErrCtor.captureStackTrace) {
40
+ ErrCtor.captureStackTrace(this, this.constructor);
41
+ }
42
+ }
43
+ };
44
+ var OritaAuthError = class extends OritaError {
45
+ constructor(message = "Invalid or missing API key", response) {
46
+ super(message, 401, response);
47
+ this.name = "OritaAuthError";
48
+ }
49
+ };
50
+ var OritaNotFoundError = class extends OritaError {
51
+ constructor(message = "Resource not found", response) {
52
+ super(message, 404, response);
53
+ this.name = "OritaNotFoundError";
54
+ }
55
+ };
56
+ var OritaSlotUnavailableError = class extends OritaError {
57
+ constructor(message = "Slot is no longer available", response) {
58
+ super(message, 409, response);
59
+ this.name = "OritaSlotUnavailableError";
60
+ }
61
+ };
62
+
63
+ // src/client.ts
64
+ var DEFAULT_BASE_URL = "https://orita.online/api/v1";
65
+ var OritaClient = class {
66
+ constructor(options) {
67
+ const { apiKey, baseUrl = DEFAULT_BASE_URL } = options;
68
+ if (!apiKey.startsWith("orita_")) {
69
+ throw new OritaAuthError("API key must start with 'orita_'");
70
+ }
71
+ this.apiKey = apiKey;
72
+ this.baseUrl = baseUrl.replace(/\/$/, "");
73
+ }
74
+ // ── Private helpers ────────────────────────────────────────────────────────
75
+ buildUrl(path, params) {
76
+ const url = new URL(`${this.baseUrl}${path}`);
77
+ if (params) {
78
+ for (const [key, value] of Object.entries(params)) {
79
+ url.searchParams.set(key, value);
80
+ }
81
+ }
82
+ return url.toString();
83
+ }
84
+ async request(method, path, options = {}) {
85
+ const url = this.buildUrl(path, options.params);
86
+ const init = {
87
+ method,
88
+ headers: {
89
+ Authorization: `Bearer ${this.apiKey}`,
90
+ "Content-Type": "application/json",
91
+ Accept: "application/json"
92
+ }
93
+ };
94
+ if (options.body !== void 0) {
95
+ init.body = JSON.stringify(options.body);
96
+ }
97
+ let res;
98
+ try {
99
+ res = await fetch(url, init);
100
+ } catch (err) {
101
+ throw new OritaError(
102
+ `Network error: ${err instanceof Error ? err.message : String(err)}`
103
+ );
104
+ }
105
+ let json;
106
+ try {
107
+ json = await res.json();
108
+ } catch {
109
+ throw new OritaError(`Invalid JSON response (HTTP ${res.status})`);
110
+ }
111
+ if (res.status === 401) {
112
+ const msg = json?.error ?? "Invalid or missing API key";
113
+ throw new OritaAuthError(msg, json);
114
+ }
115
+ if (res.status === 404) {
116
+ const msg = json?.error ?? "Resource not found";
117
+ throw new OritaNotFoundError(msg, json);
118
+ }
119
+ if (res.status === 409) {
120
+ const msg = json?.error ?? "Slot is no longer available";
121
+ throw new OritaSlotUnavailableError(msg, json);
122
+ }
123
+ if (!res.ok) {
124
+ const msg = json?.error ?? `HTTP ${res.status}`;
125
+ throw new OritaError(msg, res.status, json);
126
+ }
127
+ return json;
128
+ }
129
+ // ── Public API ─────────────────────────────────────────────────────────────
130
+ /**
131
+ * List all active event types for your account.
132
+ *
133
+ * @example
134
+ * const eventTypes = await orita.getEventTypes();
135
+ * // [{ id: "evt_abc123", title: "Initial Consultation", duration: 30, ... }]
136
+ */
137
+ async getEventTypes() {
138
+ const res = await this.request("GET", "/event-types");
139
+ return res.data;
140
+ }
141
+ /**
142
+ * Get available time slots for an event type on a given date.
143
+ *
144
+ * @param eventTypeId - Event type ID from `getEventTypes()`
145
+ * @param date - Date in `YYYY-MM-DD` format
146
+ *
147
+ * @example
148
+ * const { slots } = await orita.getSlots('evt_abc123', '2026-08-01');
149
+ * // [{ label: "09:00 AM", value: "09:00" }, ...]
150
+ */
151
+ async getSlots(eventTypeId, date) {
152
+ const res = await this.request(
153
+ "GET",
154
+ "/slots",
155
+ { params: { eventTypeId, date } }
156
+ );
157
+ return res;
158
+ }
159
+ /**
160
+ * Book an appointment. Returns the created booking object.
161
+ *
162
+ * @example
163
+ * const booking = await orita.book({
164
+ * eventTypeId: 'evt_abc123',
165
+ * date: '2026-08-01',
166
+ * time: '10:00',
167
+ * clientName: 'Ana',
168
+ * clientLastname: 'López',
169
+ * clientEmail: 'ana@example.com',
170
+ * });
171
+ * console.log(booking.id); // "book_xyz789"
172
+ */
173
+ async book(params) {
174
+ const body = {
175
+ eventTypeId: params.eventTypeId,
176
+ date: params.date,
177
+ time: params.time,
178
+ clientName: params.clientName,
179
+ clientLastname: params.clientLastname,
180
+ clientEmail: params.clientEmail
181
+ };
182
+ if (params.clientPhone) body.clientPhone = params.clientPhone;
183
+ if (params.clientTimezone) body.clientTimezone = params.clientTimezone;
184
+ if (params.notes) body.notes = params.notes;
185
+ const res = await this.request("POST", "/bookings", { body });
186
+ return res.data;
187
+ }
188
+ /**
189
+ * List your bookings with optional filtering.
190
+ *
191
+ * @example
192
+ * const bookings = await orita.getBookings({ status: 'confirmed' });
193
+ */
194
+ async getBookings(params = {}) {
195
+ const query = {};
196
+ if (params.page !== void 0) query.page = String(params.page);
197
+ if (params.limit !== void 0) query.limit = String(params.limit);
198
+ if (params.status) query.status = params.status;
199
+ const res = await this.request("GET", "/bookings", { params: query });
200
+ return res.data;
201
+ }
202
+ /**
203
+ * Retrieve a single booking by ID.
204
+ *
205
+ * @example
206
+ * const booking = await orita.getBooking('book_xyz789');
207
+ * console.log(booking.status); // "confirmed"
208
+ */
209
+ async getBooking(bookingId) {
210
+ const res = await this.request("GET", `/bookings/${bookingId}`);
211
+ return res.data;
212
+ }
213
+ /**
214
+ * Cancel a booking by ID.
215
+ *
216
+ * @param bookingId - The booking ID to cancel
217
+ * @param reason - Optional cancellation reason
218
+ *
219
+ * @example
220
+ * const result = await orita.cancelBooking('book_xyz789', 'Client requested reschedule');
221
+ */
222
+ async cancelBooking(bookingId, reason) {
223
+ const body = {};
224
+ if (reason) body.reason = reason;
225
+ const res = await this.request(
226
+ "POST",
227
+ `/bookings/${bookingId}/cancel`,
228
+ { body: Object.keys(body).length ? body : void 0 }
229
+ );
230
+ return res.data;
231
+ }
232
+ /**
233
+ * Get your own Capability Manifest (your profile).
234
+ * Requires authentication.
235
+ *
236
+ * @example
237
+ * const profile = await orita.getMyProfile();
238
+ * console.log(profile.username);
239
+ */
240
+ async getMyProfile() {
241
+ const res = await this.request("GET", "/profile");
242
+ return res.data;
243
+ }
244
+ /**
245
+ * Update your profile fields.
246
+ *
247
+ * @example
248
+ * const updated = await orita.updateProfile({ bio: 'AI-native therapist' });
249
+ */
250
+ async updateProfile(fields) {
251
+ const res = await this.request("PUT", "/profile", { body: fields });
252
+ return res.data;
253
+ }
254
+ /**
255
+ * Fetch the **public** Capability Manifest for any professional by username.
256
+ * No API key is needed for this request.
257
+ *
258
+ * @param username - The professional's username (e.g. "dra-martinez")
259
+ *
260
+ * @example
261
+ * const manifest = await orita.getProfile('dra-martinez');
262
+ * console.log(manifest.eventTypes);
263
+ */
264
+ async getProfile(username) {
265
+ const url = this.buildUrl("/profile", { username });
266
+ let res;
267
+ try {
268
+ res = await fetch(url, {
269
+ headers: { Accept: "application/json" }
270
+ });
271
+ } catch (err) {
272
+ throw new OritaError(
273
+ `Network error: ${err instanceof Error ? err.message : String(err)}`
274
+ );
275
+ }
276
+ let json;
277
+ try {
278
+ json = await res.json();
279
+ } catch {
280
+ throw new OritaError(`Invalid JSON response (HTTP ${res.status})`);
281
+ }
282
+ if (res.status === 404) {
283
+ throw new OritaNotFoundError(`Professional '${username}' not found`, json);
284
+ }
285
+ if (!res.ok) {
286
+ const msg = json?.error ?? `HTTP ${res.status}`;
287
+ throw new OritaError(msg, res.status, json);
288
+ }
289
+ return json.data;
290
+ }
291
+ };
292
+ // Annotate the CommonJS export names for ESM import in node:
293
+ 0 && (module.exports = {
294
+ OritaAuthError,
295
+ OritaClient,
296
+ OritaError,
297
+ OritaNotFoundError,
298
+ OritaSlotUnavailableError
299
+ });
@@ -0,0 +1,202 @@
1
+ interface EventType {
2
+ id: string;
3
+ title: string;
4
+ slug: string;
5
+ duration: number;
6
+ description?: string;
7
+ location?: string;
8
+ active: boolean;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ }
12
+ interface Slot {
13
+ label: string;
14
+ value: string;
15
+ }
16
+ interface SlotsResponse {
17
+ slots: Slot[];
18
+ date: string;
19
+ eventTypeId: string;
20
+ }
21
+ interface Booking {
22
+ id: string;
23
+ eventTypeId: string;
24
+ date: string;
25
+ time: string;
26
+ status: 'confirmed' | 'cancelled' | 'completed' | 'pending';
27
+ clientName: string;
28
+ clientLastname: string;
29
+ clientEmail: string;
30
+ clientPhone?: string;
31
+ clientTimezone?: string;
32
+ notes?: string;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ }
36
+ interface BookingParams {
37
+ eventTypeId: string;
38
+ date: string;
39
+ time: string;
40
+ clientName: string;
41
+ clientLastname: string;
42
+ clientEmail: string;
43
+ clientPhone?: string;
44
+ clientTimezone?: string;
45
+ notes?: string;
46
+ }
47
+ interface BookingsListParams {
48
+ page?: number;
49
+ limit?: number;
50
+ status?: 'confirmed' | 'cancelled' | 'completed' | 'pending';
51
+ }
52
+ interface Profile {
53
+ username: string;
54
+ bio?: string;
55
+ timezone?: string;
56
+ eventTypes: EventType[];
57
+ [key: string]: unknown;
58
+ }
59
+ interface UpdateProfileParams {
60
+ bio?: string;
61
+ timezone?: string;
62
+ [key: string]: unknown;
63
+ }
64
+
65
+ interface OritaClientOptions {
66
+ /**
67
+ * Your Orita API key (must start with `orita_`).
68
+ * Get yours at https://orita.online/developers
69
+ */
70
+ apiKey: string;
71
+ /**
72
+ * Override the base URL (for self-hosted or staging environments).
73
+ * @default "https://orita.online/api/v1"
74
+ */
75
+ baseUrl?: string;
76
+ }
77
+ declare class OritaClient {
78
+ private readonly apiKey;
79
+ private readonly baseUrl;
80
+ constructor(options: OritaClientOptions);
81
+ private buildUrl;
82
+ private request;
83
+ /**
84
+ * List all active event types for your account.
85
+ *
86
+ * @example
87
+ * const eventTypes = await orita.getEventTypes();
88
+ * // [{ id: "evt_abc123", title: "Initial Consultation", duration: 30, ... }]
89
+ */
90
+ getEventTypes(): Promise<EventType[]>;
91
+ /**
92
+ * Get available time slots for an event type on a given date.
93
+ *
94
+ * @param eventTypeId - Event type ID from `getEventTypes()`
95
+ * @param date - Date in `YYYY-MM-DD` format
96
+ *
97
+ * @example
98
+ * const { slots } = await orita.getSlots('evt_abc123', '2026-08-01');
99
+ * // [{ label: "09:00 AM", value: "09:00" }, ...]
100
+ */
101
+ getSlots(eventTypeId: string, date: string): Promise<{
102
+ slots: Slot[];
103
+ date: string;
104
+ eventTypeId: string;
105
+ }>;
106
+ /**
107
+ * Book an appointment. Returns the created booking object.
108
+ *
109
+ * @example
110
+ * const booking = await orita.book({
111
+ * eventTypeId: 'evt_abc123',
112
+ * date: '2026-08-01',
113
+ * time: '10:00',
114
+ * clientName: 'Ana',
115
+ * clientLastname: 'López',
116
+ * clientEmail: 'ana@example.com',
117
+ * });
118
+ * console.log(booking.id); // "book_xyz789"
119
+ */
120
+ book(params: BookingParams): Promise<Booking>;
121
+ /**
122
+ * List your bookings with optional filtering.
123
+ *
124
+ * @example
125
+ * const bookings = await orita.getBookings({ status: 'confirmed' });
126
+ */
127
+ getBookings(params?: BookingsListParams): Promise<Booking[]>;
128
+ /**
129
+ * Retrieve a single booking by ID.
130
+ *
131
+ * @example
132
+ * const booking = await orita.getBooking('book_xyz789');
133
+ * console.log(booking.status); // "confirmed"
134
+ */
135
+ getBooking(bookingId: string): Promise<Booking>;
136
+ /**
137
+ * Cancel a booking by ID.
138
+ *
139
+ * @param bookingId - The booking ID to cancel
140
+ * @param reason - Optional cancellation reason
141
+ *
142
+ * @example
143
+ * const result = await orita.cancelBooking('book_xyz789', 'Client requested reschedule');
144
+ */
145
+ cancelBooking(bookingId: string, reason?: string): Promise<Booking>;
146
+ /**
147
+ * Get your own Capability Manifest (your profile).
148
+ * Requires authentication.
149
+ *
150
+ * @example
151
+ * const profile = await orita.getMyProfile();
152
+ * console.log(profile.username);
153
+ */
154
+ getMyProfile(): Promise<Profile>;
155
+ /**
156
+ * Update your profile fields.
157
+ *
158
+ * @example
159
+ * const updated = await orita.updateProfile({ bio: 'AI-native therapist' });
160
+ */
161
+ updateProfile(fields: UpdateProfileParams): Promise<Profile>;
162
+ /**
163
+ * Fetch the **public** Capability Manifest for any professional by username.
164
+ * No API key is needed for this request.
165
+ *
166
+ * @param username - The professional's username (e.g. "dra-martinez")
167
+ *
168
+ * @example
169
+ * const manifest = await orita.getProfile('dra-martinez');
170
+ * console.log(manifest.eventTypes);
171
+ */
172
+ getProfile(username: string): Promise<Profile>;
173
+ }
174
+
175
+ /**
176
+ * Base error class for all Orita API errors.
177
+ */
178
+ declare class OritaError extends Error {
179
+ readonly statusCode?: number;
180
+ readonly response?: unknown;
181
+ constructor(message: string, statusCode?: number, response?: unknown);
182
+ }
183
+ /**
184
+ * Thrown when the API key is invalid or missing (HTTP 401).
185
+ */
186
+ declare class OritaAuthError extends OritaError {
187
+ constructor(message?: string, response?: unknown);
188
+ }
189
+ /**
190
+ * Thrown when the requested resource is not found (HTTP 404).
191
+ */
192
+ declare class OritaNotFoundError extends OritaError {
193
+ constructor(message?: string, response?: unknown);
194
+ }
195
+ /**
196
+ * Thrown when the requested time slot is already taken (HTTP 409).
197
+ */
198
+ declare class OritaSlotUnavailableError extends OritaError {
199
+ constructor(message?: string, response?: unknown);
200
+ }
201
+
202
+ export { type Booking, type BookingParams, type BookingsListParams, type EventType, OritaAuthError, OritaClient, type OritaClientOptions, OritaError, OritaNotFoundError, OritaSlotUnavailableError, type Profile, type Slot, type SlotsResponse, type UpdateProfileParams };
@@ -0,0 +1,202 @@
1
+ interface EventType {
2
+ id: string;
3
+ title: string;
4
+ slug: string;
5
+ duration: number;
6
+ description?: string;
7
+ location?: string;
8
+ active: boolean;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ }
12
+ interface Slot {
13
+ label: string;
14
+ value: string;
15
+ }
16
+ interface SlotsResponse {
17
+ slots: Slot[];
18
+ date: string;
19
+ eventTypeId: string;
20
+ }
21
+ interface Booking {
22
+ id: string;
23
+ eventTypeId: string;
24
+ date: string;
25
+ time: string;
26
+ status: 'confirmed' | 'cancelled' | 'completed' | 'pending';
27
+ clientName: string;
28
+ clientLastname: string;
29
+ clientEmail: string;
30
+ clientPhone?: string;
31
+ clientTimezone?: string;
32
+ notes?: string;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ }
36
+ interface BookingParams {
37
+ eventTypeId: string;
38
+ date: string;
39
+ time: string;
40
+ clientName: string;
41
+ clientLastname: string;
42
+ clientEmail: string;
43
+ clientPhone?: string;
44
+ clientTimezone?: string;
45
+ notes?: string;
46
+ }
47
+ interface BookingsListParams {
48
+ page?: number;
49
+ limit?: number;
50
+ status?: 'confirmed' | 'cancelled' | 'completed' | 'pending';
51
+ }
52
+ interface Profile {
53
+ username: string;
54
+ bio?: string;
55
+ timezone?: string;
56
+ eventTypes: EventType[];
57
+ [key: string]: unknown;
58
+ }
59
+ interface UpdateProfileParams {
60
+ bio?: string;
61
+ timezone?: string;
62
+ [key: string]: unknown;
63
+ }
64
+
65
+ interface OritaClientOptions {
66
+ /**
67
+ * Your Orita API key (must start with `orita_`).
68
+ * Get yours at https://orita.online/developers
69
+ */
70
+ apiKey: string;
71
+ /**
72
+ * Override the base URL (for self-hosted or staging environments).
73
+ * @default "https://orita.online/api/v1"
74
+ */
75
+ baseUrl?: string;
76
+ }
77
+ declare class OritaClient {
78
+ private readonly apiKey;
79
+ private readonly baseUrl;
80
+ constructor(options: OritaClientOptions);
81
+ private buildUrl;
82
+ private request;
83
+ /**
84
+ * List all active event types for your account.
85
+ *
86
+ * @example
87
+ * const eventTypes = await orita.getEventTypes();
88
+ * // [{ id: "evt_abc123", title: "Initial Consultation", duration: 30, ... }]
89
+ */
90
+ getEventTypes(): Promise<EventType[]>;
91
+ /**
92
+ * Get available time slots for an event type on a given date.
93
+ *
94
+ * @param eventTypeId - Event type ID from `getEventTypes()`
95
+ * @param date - Date in `YYYY-MM-DD` format
96
+ *
97
+ * @example
98
+ * const { slots } = await orita.getSlots('evt_abc123', '2026-08-01');
99
+ * // [{ label: "09:00 AM", value: "09:00" }, ...]
100
+ */
101
+ getSlots(eventTypeId: string, date: string): Promise<{
102
+ slots: Slot[];
103
+ date: string;
104
+ eventTypeId: string;
105
+ }>;
106
+ /**
107
+ * Book an appointment. Returns the created booking object.
108
+ *
109
+ * @example
110
+ * const booking = await orita.book({
111
+ * eventTypeId: 'evt_abc123',
112
+ * date: '2026-08-01',
113
+ * time: '10:00',
114
+ * clientName: 'Ana',
115
+ * clientLastname: 'López',
116
+ * clientEmail: 'ana@example.com',
117
+ * });
118
+ * console.log(booking.id); // "book_xyz789"
119
+ */
120
+ book(params: BookingParams): Promise<Booking>;
121
+ /**
122
+ * List your bookings with optional filtering.
123
+ *
124
+ * @example
125
+ * const bookings = await orita.getBookings({ status: 'confirmed' });
126
+ */
127
+ getBookings(params?: BookingsListParams): Promise<Booking[]>;
128
+ /**
129
+ * Retrieve a single booking by ID.
130
+ *
131
+ * @example
132
+ * const booking = await orita.getBooking('book_xyz789');
133
+ * console.log(booking.status); // "confirmed"
134
+ */
135
+ getBooking(bookingId: string): Promise<Booking>;
136
+ /**
137
+ * Cancel a booking by ID.
138
+ *
139
+ * @param bookingId - The booking ID to cancel
140
+ * @param reason - Optional cancellation reason
141
+ *
142
+ * @example
143
+ * const result = await orita.cancelBooking('book_xyz789', 'Client requested reschedule');
144
+ */
145
+ cancelBooking(bookingId: string, reason?: string): Promise<Booking>;
146
+ /**
147
+ * Get your own Capability Manifest (your profile).
148
+ * Requires authentication.
149
+ *
150
+ * @example
151
+ * const profile = await orita.getMyProfile();
152
+ * console.log(profile.username);
153
+ */
154
+ getMyProfile(): Promise<Profile>;
155
+ /**
156
+ * Update your profile fields.
157
+ *
158
+ * @example
159
+ * const updated = await orita.updateProfile({ bio: 'AI-native therapist' });
160
+ */
161
+ updateProfile(fields: UpdateProfileParams): Promise<Profile>;
162
+ /**
163
+ * Fetch the **public** Capability Manifest for any professional by username.
164
+ * No API key is needed for this request.
165
+ *
166
+ * @param username - The professional's username (e.g. "dra-martinez")
167
+ *
168
+ * @example
169
+ * const manifest = await orita.getProfile('dra-martinez');
170
+ * console.log(manifest.eventTypes);
171
+ */
172
+ getProfile(username: string): Promise<Profile>;
173
+ }
174
+
175
+ /**
176
+ * Base error class for all Orita API errors.
177
+ */
178
+ declare class OritaError extends Error {
179
+ readonly statusCode?: number;
180
+ readonly response?: unknown;
181
+ constructor(message: string, statusCode?: number, response?: unknown);
182
+ }
183
+ /**
184
+ * Thrown when the API key is invalid or missing (HTTP 401).
185
+ */
186
+ declare class OritaAuthError extends OritaError {
187
+ constructor(message?: string, response?: unknown);
188
+ }
189
+ /**
190
+ * Thrown when the requested resource is not found (HTTP 404).
191
+ */
192
+ declare class OritaNotFoundError extends OritaError {
193
+ constructor(message?: string, response?: unknown);
194
+ }
195
+ /**
196
+ * Thrown when the requested time slot is already taken (HTTP 409).
197
+ */
198
+ declare class OritaSlotUnavailableError extends OritaError {
199
+ constructor(message?: string, response?: unknown);
200
+ }
201
+
202
+ export { type Booking, type BookingParams, type BookingsListParams, type EventType, OritaAuthError, OritaClient, type OritaClientOptions, OritaError, OritaNotFoundError, OritaSlotUnavailableError, type Profile, type Slot, type SlotsResponse, type UpdateProfileParams };