@lifestreamdynamics/vault-sdk 1.2.0 → 2.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/README.md +245 -13
- package/dist/client.d.ts +30 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +44 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +14 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/resources/booking.d.ts +406 -0
- package/dist/resources/booking.d.ts.map +1 -0
- package/dist/resources/booking.js +430 -0
- package/dist/resources/booking.js.map +1 -0
- package/dist/resources/calendar.d.ts +294 -2
- package/dist/resources/calendar.d.ts.map +1 -1
- package/dist/resources/calendar.js +363 -4
- package/dist/resources/calendar.js.map +1 -1
- package/dist/resources/collaboration.d.ts +33 -0
- package/dist/resources/collaboration.d.ts.map +1 -0
- package/dist/resources/collaboration.js +40 -0
- package/dist/resources/collaboration.js.map +1 -0
- package/dist/resources/documents.d.ts +28 -0
- package/dist/resources/documents.d.ts.map +1 -1
- package/dist/resources/documents.js +59 -0
- package/dist/resources/documents.js.map +1 -1
- package/dist/resources/plugins.d.ts +101 -0
- package/dist/resources/plugins.d.ts.map +1 -0
- package/dist/resources/plugins.js +127 -0
- package/dist/resources/plugins.js.map +1 -0
- package/dist/resources/saml.d.ts +142 -0
- package/dist/resources/saml.d.ts.map +1 -0
- package/dist/resources/saml.js +138 -0
- package/dist/resources/saml.js.map +1 -0
- package/dist/resources/scim.d.ts +211 -0
- package/dist/resources/scim.d.ts.map +1 -0
- package/dist/resources/scim.js +131 -0
- package/dist/resources/scim.js.map +1 -0
- package/dist/resources/search.d.ts +13 -0
- package/dist/resources/search.d.ts.map +1 -1
- package/dist/resources/search.js +19 -0
- package/dist/resources/search.js.map +1 -1
- package/dist/resources/team-booking-groups.d.ts +149 -0
- package/dist/resources/team-booking-groups.d.ts.map +1 -0
- package/dist/resources/team-booking-groups.js +175 -0
- package/dist/resources/team-booking-groups.js.map +1 -0
- package/dist/resources/teams.d.ts +10 -1
- package/dist/resources/teams.d.ts.map +1 -1
- package/dist/resources/teams.js +53 -6
- package/dist/resources/teams.js.map +1 -1
- package/dist/resources/user.d.ts +16 -0
- package/dist/resources/user.d.ts.map +1 -1
- package/dist/resources/user.js +31 -0
- package/dist/resources/user.js.map +1 -1
- package/dist/resources/vaults.d.ts +9 -0
- package/dist/resources/vaults.d.ts.map +1 -1
- package/dist/resources/vaults.js +14 -0
- package/dist/resources/vaults.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
import type { KyInstance } from 'ky';
|
|
2
|
+
export type WaitlistStatus = 'waiting' | 'notified' | 'expired' | 'left';
|
|
3
|
+
export interface BookingWaitlistEntry {
|
|
4
|
+
id: string;
|
|
5
|
+
slotId: string;
|
|
6
|
+
vaultId: string;
|
|
7
|
+
startAt: string;
|
|
8
|
+
guestName: string;
|
|
9
|
+
guestEmail: string;
|
|
10
|
+
guestPhone?: string | null;
|
|
11
|
+
position: number;
|
|
12
|
+
status: WaitlistStatus;
|
|
13
|
+
notifiedAt?: string | null;
|
|
14
|
+
expiresAt?: string | null;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
}
|
|
17
|
+
export interface JoinWaitlistInput {
|
|
18
|
+
guestName: string;
|
|
19
|
+
guestEmail: string;
|
|
20
|
+
guestPhone?: string;
|
|
21
|
+
startAt: string;
|
|
22
|
+
}
|
|
23
|
+
export interface WaitlistFilters {
|
|
24
|
+
startAt?: string;
|
|
25
|
+
status?: WaitlistStatus;
|
|
26
|
+
}
|
|
27
|
+
export interface EventSlot {
|
|
28
|
+
id: string;
|
|
29
|
+
vaultId: string;
|
|
30
|
+
userId: string;
|
|
31
|
+
title: string;
|
|
32
|
+
description?: string;
|
|
33
|
+
durationMin: number;
|
|
34
|
+
bufferMin: number;
|
|
35
|
+
startTime: string;
|
|
36
|
+
endTime: string;
|
|
37
|
+
daysOfWeek: string[];
|
|
38
|
+
timezone: string;
|
|
39
|
+
isActive: boolean;
|
|
40
|
+
maxConcurrent: number;
|
|
41
|
+
confirmationMode: 'auto' | 'email' | 'manual';
|
|
42
|
+
createBackingFile: boolean;
|
|
43
|
+
requirePhone: boolean;
|
|
44
|
+
/** Price in smallest currency unit (cents). Null means the slot is free. */
|
|
45
|
+
priceCents?: number | null;
|
|
46
|
+
/** ISO 4217 currency code, e.g. 'CAD'. */
|
|
47
|
+
currency: string;
|
|
48
|
+
/** When true, an invoice will be created and sent to the guest after booking. */
|
|
49
|
+
requirePayment: boolean;
|
|
50
|
+
customFields?: unknown;
|
|
51
|
+
metadata?: unknown;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
55
|
+
export type PaymentStatus = 'unpaid' | 'invoiced' | 'paid' | 'refunded' | 'partial';
|
|
56
|
+
export interface Booking {
|
|
57
|
+
id: string;
|
|
58
|
+
slotId: string;
|
|
59
|
+
calendarEventId?: string;
|
|
60
|
+
vaultId: string;
|
|
61
|
+
status: 'pending' | 'confirmed' | 'cancelled' | 'no_show' | 'completed';
|
|
62
|
+
startAt: string;
|
|
63
|
+
endAt: string;
|
|
64
|
+
guestName: string;
|
|
65
|
+
guestEmail: string;
|
|
66
|
+
guestPhone?: string;
|
|
67
|
+
guestNotes?: string;
|
|
68
|
+
metadata?: unknown;
|
|
69
|
+
confirmedAt?: string;
|
|
70
|
+
cancelledAt?: string;
|
|
71
|
+
/** External invoice ID from the accounting system. */
|
|
72
|
+
invoiceId?: string | null;
|
|
73
|
+
/** Payment status for this booking. */
|
|
74
|
+
paymentStatus: PaymentStatus;
|
|
75
|
+
createdAt: string;
|
|
76
|
+
updatedAt: string;
|
|
77
|
+
}
|
|
78
|
+
export interface AvailableTime {
|
|
79
|
+
startAt: string;
|
|
80
|
+
endAt: string;
|
|
81
|
+
}
|
|
82
|
+
/** Branding configuration returned alongside public booking slot listings. */
|
|
83
|
+
export interface BookingBranding {
|
|
84
|
+
bookingLogoUrl: string | null;
|
|
85
|
+
bookingAccentColor: string | null;
|
|
86
|
+
bookingWelcomeMessage: string | null;
|
|
87
|
+
hidePoweredBy: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface AvailabilityResponse {
|
|
90
|
+
times: AvailableTime[];
|
|
91
|
+
}
|
|
92
|
+
export interface CreateSlotInput {
|
|
93
|
+
title: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
durationMin: number;
|
|
96
|
+
bufferMin?: number;
|
|
97
|
+
startTime: string;
|
|
98
|
+
endTime: string;
|
|
99
|
+
daysOfWeek: string[];
|
|
100
|
+
timezone: string;
|
|
101
|
+
maxConcurrent?: number;
|
|
102
|
+
confirmationMode?: 'auto' | 'email' | 'manual';
|
|
103
|
+
createBackingFile?: boolean;
|
|
104
|
+
requirePhone?: boolean;
|
|
105
|
+
priceCents?: number;
|
|
106
|
+
currency?: string;
|
|
107
|
+
requirePayment?: boolean;
|
|
108
|
+
customFields?: unknown;
|
|
109
|
+
metadata?: unknown;
|
|
110
|
+
}
|
|
111
|
+
export interface UpdateSlotInput extends Partial<CreateSlotInput> {
|
|
112
|
+
isActive?: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface BookingFilters {
|
|
115
|
+
status?: Booking['status'];
|
|
116
|
+
slotId?: string;
|
|
117
|
+
startAfter?: string;
|
|
118
|
+
startBefore?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface BookingAnalytics {
|
|
121
|
+
view: string;
|
|
122
|
+
data: Array<Record<string, unknown>>;
|
|
123
|
+
}
|
|
124
|
+
export interface AnalyticsFilters {
|
|
125
|
+
view?: 'volume' | 'funnel' | 'peak-times';
|
|
126
|
+
from?: string;
|
|
127
|
+
to?: string;
|
|
128
|
+
slotId?: string;
|
|
129
|
+
}
|
|
130
|
+
export interface EventTemplate {
|
|
131
|
+
id: string;
|
|
132
|
+
vaultId: string;
|
|
133
|
+
userId: string;
|
|
134
|
+
name: string;
|
|
135
|
+
description?: string;
|
|
136
|
+
defaults: Record<string, unknown>;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
}
|
|
140
|
+
export interface CreateTemplateInput {
|
|
141
|
+
name: string;
|
|
142
|
+
description?: string;
|
|
143
|
+
defaults: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
export type { AssignmentMode, TeamBookingGroup, TeamBookingGroupMember, CreateBookingGroupInput, UpdateBookingGroupInput, AddGroupMemberInput, } from './team-booking-groups.js';
|
|
146
|
+
/**
|
|
147
|
+
* Resource for booking slots and guest booking management.
|
|
148
|
+
*
|
|
149
|
+
* Provides methods to manage event slots (bookable time windows) and
|
|
150
|
+
* their associated bookings (guest reservations) within a vault.
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```typescript
|
|
154
|
+
* // List all booking slots for a vault
|
|
155
|
+
* const slots = await client.booking.listSlots('vault-id');
|
|
156
|
+
*
|
|
157
|
+
* // Check availability for a specific slot
|
|
158
|
+
* const availability = await client.booking.getAvailability(
|
|
159
|
+
* 'vault-id',
|
|
160
|
+
* 'slot-id',
|
|
161
|
+
* '2026-03-15',
|
|
162
|
+
* );
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
export declare class BookingResource {
|
|
166
|
+
private http;
|
|
167
|
+
constructor(http: KyInstance);
|
|
168
|
+
/**
|
|
169
|
+
* List all event slots for a vault.
|
|
170
|
+
*
|
|
171
|
+
* @param vaultId - Vault ID
|
|
172
|
+
* @returns Array of event slots
|
|
173
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
174
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
175
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
176
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
177
|
+
*/
|
|
178
|
+
listSlots(vaultId: string): Promise<EventSlot[]>;
|
|
179
|
+
/**
|
|
180
|
+
* Create a new bookable event slot.
|
|
181
|
+
*
|
|
182
|
+
* @param vaultId - Vault ID
|
|
183
|
+
* @param data - Slot configuration
|
|
184
|
+
* @returns The created slot
|
|
185
|
+
* @throws {ValidationError} If the slot data is invalid
|
|
186
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
187
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
188
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
189
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
190
|
+
*/
|
|
191
|
+
createSlot(vaultId: string, data: CreateSlotInput): Promise<EventSlot>;
|
|
192
|
+
/**
|
|
193
|
+
* Update an existing event slot.
|
|
194
|
+
*
|
|
195
|
+
* @param vaultId - Vault ID
|
|
196
|
+
* @param slotId - Slot ID
|
|
197
|
+
* @param data - Partial slot data to update
|
|
198
|
+
* @returns The updated slot
|
|
199
|
+
* @throws {ValidationError} If the update data is invalid
|
|
200
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
201
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or slot
|
|
202
|
+
* @throws {NotFoundError} If the vault or slot does not exist
|
|
203
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
204
|
+
*/
|
|
205
|
+
updateSlot(vaultId: string, slotId: string, data: UpdateSlotInput): Promise<EventSlot>;
|
|
206
|
+
/**
|
|
207
|
+
* Delete an event slot.
|
|
208
|
+
*
|
|
209
|
+
* @param vaultId - Vault ID
|
|
210
|
+
* @param slotId - Slot ID
|
|
211
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
212
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or slot
|
|
213
|
+
* @throws {NotFoundError} If the vault or slot does not exist
|
|
214
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
215
|
+
*/
|
|
216
|
+
deleteSlot(vaultId: string, slotId: string): Promise<void>;
|
|
217
|
+
/**
|
|
218
|
+
* Get available time windows for a slot on a given date.
|
|
219
|
+
*
|
|
220
|
+
* @param vaultId - Vault ID
|
|
221
|
+
* @param slotId - Slot ID
|
|
222
|
+
* @param date - Date to check availability for (YYYY-MM-DD)
|
|
223
|
+
* @returns Availability information including open time windows
|
|
224
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
225
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
226
|
+
* @throws {NotFoundError} If the vault or slot does not exist
|
|
227
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
228
|
+
*/
|
|
229
|
+
getAvailability(vaultId: string, slotId: string, date: string): Promise<AvailabilityResponse>;
|
|
230
|
+
/**
|
|
231
|
+
* List bookings for a vault, with optional filters.
|
|
232
|
+
*
|
|
233
|
+
* @param vaultId - Vault ID
|
|
234
|
+
* @param filters - Optional filter parameters
|
|
235
|
+
* @param filters.status - Filter by booking status
|
|
236
|
+
* @param filters.slotId - Filter by slot ID
|
|
237
|
+
* @param filters.startAfter - Filter bookings starting on or after this date (YYYY-MM-DD)
|
|
238
|
+
* @param filters.startBefore - Filter bookings starting on or before this date (YYYY-MM-DD)
|
|
239
|
+
* @returns Array of bookings
|
|
240
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
241
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
242
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
243
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
244
|
+
*/
|
|
245
|
+
listBookings(vaultId: string, filters?: BookingFilters): Promise<{
|
|
246
|
+
bookings: Booking[];
|
|
247
|
+
total: number;
|
|
248
|
+
}>;
|
|
249
|
+
/**
|
|
250
|
+
* Get a single booking by ID.
|
|
251
|
+
*
|
|
252
|
+
* @param vaultId - Vault ID
|
|
253
|
+
* @param bookingId - Booking ID
|
|
254
|
+
* @returns The booking record
|
|
255
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
256
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or booking
|
|
257
|
+
* @throws {NotFoundError} If the vault or booking does not exist
|
|
258
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
259
|
+
*/
|
|
260
|
+
getBooking(vaultId: string, bookingId: string): Promise<Booking>;
|
|
261
|
+
/**
|
|
262
|
+
* Update the status of a booking (confirm, cancel, mark no-show, etc.).
|
|
263
|
+
*
|
|
264
|
+
* @param vaultId - Vault ID
|
|
265
|
+
* @param bookingId - Booking ID
|
|
266
|
+
* @param status - New status for the booking
|
|
267
|
+
* @returns The updated booking
|
|
268
|
+
* @throws {ValidationError} If the status transition is not allowed
|
|
269
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
270
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or booking
|
|
271
|
+
* @throws {NotFoundError} If the vault or booking does not exist
|
|
272
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
273
|
+
*/
|
|
274
|
+
updateBookingStatus(vaultId: string, bookingId: string, status: Booking['status']): Promise<Booking>;
|
|
275
|
+
/**
|
|
276
|
+
* List all event templates for a vault.
|
|
277
|
+
*
|
|
278
|
+
* @param vaultId - Vault ID
|
|
279
|
+
* @returns Array of event templates
|
|
280
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
281
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
282
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
283
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
284
|
+
*/
|
|
285
|
+
listTemplates(vaultId: string): Promise<EventTemplate[]>;
|
|
286
|
+
/**
|
|
287
|
+
* Create a new event template.
|
|
288
|
+
*
|
|
289
|
+
* @param vaultId - Vault ID
|
|
290
|
+
* @param data - Template configuration
|
|
291
|
+
* @returns The created template
|
|
292
|
+
* @throws {ValidationError} If the template data is invalid
|
|
293
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
294
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
295
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
296
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
297
|
+
*/
|
|
298
|
+
createTemplate(vaultId: string, data: CreateTemplateInput): Promise<EventTemplate>;
|
|
299
|
+
/**
|
|
300
|
+
* Update an existing event template.
|
|
301
|
+
*
|
|
302
|
+
* @param vaultId - Vault ID
|
|
303
|
+
* @param templateId - Template ID
|
|
304
|
+
* @param data - Partial template data to update
|
|
305
|
+
* @returns The updated template
|
|
306
|
+
* @throws {ValidationError} If the update data is invalid
|
|
307
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
308
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or template
|
|
309
|
+
* @throws {NotFoundError} If the vault or template does not exist
|
|
310
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
311
|
+
*/
|
|
312
|
+
updateTemplate(vaultId: string, templateId: string, data: Partial<CreateTemplateInput>): Promise<EventTemplate>;
|
|
313
|
+
/**
|
|
314
|
+
* Delete an event template.
|
|
315
|
+
*
|
|
316
|
+
* @param vaultId - Vault ID
|
|
317
|
+
* @param templateId - Template ID
|
|
318
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
319
|
+
* @throws {AuthorizationError} If the user does not have access to the vault or template
|
|
320
|
+
* @throws {NotFoundError} If the vault or template does not exist
|
|
321
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
322
|
+
*/
|
|
323
|
+
deleteTemplate(vaultId: string, templateId: string): Promise<void>;
|
|
324
|
+
/**
|
|
325
|
+
* Get the waitlist for a booking slot.
|
|
326
|
+
*
|
|
327
|
+
* @param vaultId - Vault ID
|
|
328
|
+
* @param slotId - Event slot ID
|
|
329
|
+
* @param params - Optional filters (startAt, status)
|
|
330
|
+
* @returns Waitlist entries and total count
|
|
331
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
332
|
+
* @throws {AuthorizationError} If the user does not have access to the vault
|
|
333
|
+
* @throws {NotFoundError} If the vault or slot does not exist
|
|
334
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
335
|
+
*/
|
|
336
|
+
getWaitlist(vaultId: string, slotId: string, params?: WaitlistFilters): Promise<{
|
|
337
|
+
entries: BookingWaitlistEntry[];
|
|
338
|
+
total: number;
|
|
339
|
+
}>;
|
|
340
|
+
/**
|
|
341
|
+
* Join the waitlist for a public booking slot (no auth required).
|
|
342
|
+
*
|
|
343
|
+
* @param profileSlug - Host profile slug
|
|
344
|
+
* @param vaultSlug - Vault slug
|
|
345
|
+
* @param slotId - Event slot ID
|
|
346
|
+
* @param data - Guest details and desired start time
|
|
347
|
+
* @returns Position in waitlist and leave token
|
|
348
|
+
* @throws {NotFoundError} If the published vault or slot does not exist
|
|
349
|
+
* @throws {ValidationError} If the guest details are invalid
|
|
350
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
351
|
+
*/
|
|
352
|
+
joinWaitlist(profileSlug: string, vaultSlug: string, slotId: string, data: JoinWaitlistInput): Promise<{
|
|
353
|
+
message: string;
|
|
354
|
+
position: number;
|
|
355
|
+
leaveToken: string;
|
|
356
|
+
}>;
|
|
357
|
+
/**
|
|
358
|
+
* Leave the waitlist using a leave token (GDPR right to withdraw).
|
|
359
|
+
*
|
|
360
|
+
* @param leaveToken - The 64-char hex leave token from the join response
|
|
361
|
+
* @returns Confirmation message
|
|
362
|
+
* @throws {NotFoundError} If the leave token is invalid
|
|
363
|
+
* @throws {ValidationError} If the entry is already expired or left
|
|
364
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
365
|
+
*/
|
|
366
|
+
leaveWaitlist(leaveToken: string): Promise<{
|
|
367
|
+
message: string;
|
|
368
|
+
}>;
|
|
369
|
+
/**
|
|
370
|
+
* Reschedule a booking using a guest reschedule token.
|
|
371
|
+
*
|
|
372
|
+
* Cancels the existing booking and creates a new one at the specified time.
|
|
373
|
+
* The reschedule token is included in the guest's original confirmation email
|
|
374
|
+
* link at `/reschedule/:token`.
|
|
375
|
+
*
|
|
376
|
+
* @param token - The reschedule token from the guest's email link (64-char hex)
|
|
377
|
+
* @param newStartAt - The new start time in ISO 8601 format
|
|
378
|
+
* @returns Confirmation of the rescheduled booking
|
|
379
|
+
* @throws {NotFoundError} If the token is invalid or booking is not found
|
|
380
|
+
* @throws {ValidationError} If the new time is invalid or outside the notice window
|
|
381
|
+
* @throws {ConflictError} If the new time slot is no longer available
|
|
382
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
383
|
+
*/
|
|
384
|
+
rescheduleBooking(token: string, newStartAt: string): Promise<{
|
|
385
|
+
message: string;
|
|
386
|
+
guestName: string;
|
|
387
|
+
startAt: string;
|
|
388
|
+
}>;
|
|
389
|
+
/**
|
|
390
|
+
* Get booking analytics for a vault.
|
|
391
|
+
*
|
|
392
|
+
* @param vaultId - Vault ID
|
|
393
|
+
* @param filters - Optional analytics filters
|
|
394
|
+
* @param filters.view - Analytics view type: 'volume', 'funnel', or 'peak-times' (default: 'volume')
|
|
395
|
+
* @param filters.from - Start date (YYYY-MM-DD, default: 30 days ago)
|
|
396
|
+
* @param filters.to - End date (YYYY-MM-DD, default: today)
|
|
397
|
+
* @param filters.slotId - Filter by event slot ID
|
|
398
|
+
* @returns Booking analytics data
|
|
399
|
+
* @throws {AuthenticationError} If the request is not authenticated
|
|
400
|
+
* @throws {AuthorizationError} If the user does not have access or insufficient subscription tier
|
|
401
|
+
* @throws {NotFoundError} If the vault does not exist
|
|
402
|
+
* @throws {NetworkError} If the request fails due to network issues
|
|
403
|
+
*/
|
|
404
|
+
getBookingAnalytics(vaultId: string, filters?: AnalyticsFilters): Promise<BookingAnalytics>;
|
|
405
|
+
}
|
|
406
|
+
//# sourceMappingURL=booking.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"booking.d.ts","sourceRoot":"","sources":["../../src/resources/booking.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAOrC,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzE,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAA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