@atzentis/booking-sdk 0.1.7 → 0.1.9
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 +712 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1696 -40
- package/dist/index.d.ts +1696 -40
- package/dist/index.js +704 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1197,6 +1197,704 @@ declare class CategoriesService extends BaseService {
|
|
|
1197
1197
|
delete(categoryId: string): Promise<void>;
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
|
+
/** Supported distribution channel types */
|
|
1201
|
+
type ChannelType = "channex" | "ical" | "direct";
|
|
1202
|
+
/** Channel connection status */
|
|
1203
|
+
type ChannelStatus = "active" | "inactive" | "error" | "pending";
|
|
1204
|
+
/** Credentials for channel authentication (redacted in responses) */
|
|
1205
|
+
type ChannelCredentials = Record<string, unknown>;
|
|
1206
|
+
/** Channel sync configuration */
|
|
1207
|
+
interface ChannelSettings {
|
|
1208
|
+
autoSync?: boolean;
|
|
1209
|
+
syncInterval?: number;
|
|
1210
|
+
pushAvailability?: boolean;
|
|
1211
|
+
pushRates?: boolean;
|
|
1212
|
+
pullReservations?: boolean;
|
|
1213
|
+
}
|
|
1214
|
+
/** A distribution channel connection */
|
|
1215
|
+
interface Channel {
|
|
1216
|
+
id: string;
|
|
1217
|
+
propertyId: string;
|
|
1218
|
+
type: ChannelType;
|
|
1219
|
+
name: string;
|
|
1220
|
+
status: ChannelStatus;
|
|
1221
|
+
enabled: boolean;
|
|
1222
|
+
credentials: ChannelCredentials;
|
|
1223
|
+
settings: ChannelSettings;
|
|
1224
|
+
lastSyncAt: string | null;
|
|
1225
|
+
metadata: Record<string, unknown> | null;
|
|
1226
|
+
createdAt: string;
|
|
1227
|
+
updatedAt: string;
|
|
1228
|
+
}
|
|
1229
|
+
/** Input for creating a new channel */
|
|
1230
|
+
interface CreateChannelInput {
|
|
1231
|
+
propertyId: string;
|
|
1232
|
+
type: ChannelType;
|
|
1233
|
+
name?: string;
|
|
1234
|
+
enabled?: boolean;
|
|
1235
|
+
credentials?: ChannelCredentials;
|
|
1236
|
+
settings?: ChannelSettings;
|
|
1237
|
+
metadata?: Record<string, unknown>;
|
|
1238
|
+
}
|
|
1239
|
+
/** Input for updating an existing channel */
|
|
1240
|
+
interface UpdateChannelInput {
|
|
1241
|
+
name?: string;
|
|
1242
|
+
enabled?: boolean;
|
|
1243
|
+
credentials?: ChannelCredentials;
|
|
1244
|
+
settings?: ChannelSettings;
|
|
1245
|
+
metadata?: Record<string, unknown>;
|
|
1246
|
+
}
|
|
1247
|
+
/** Parameters for listing channels */
|
|
1248
|
+
interface ListChannelsParams {
|
|
1249
|
+
propertyId?: string;
|
|
1250
|
+
type?: ChannelType;
|
|
1251
|
+
status?: ChannelStatus;
|
|
1252
|
+
enabled?: boolean;
|
|
1253
|
+
limit?: number;
|
|
1254
|
+
cursor?: string;
|
|
1255
|
+
}
|
|
1256
|
+
/** Paginated list of channels */
|
|
1257
|
+
type PaginatedChannels = Paginated<Channel>;
|
|
1258
|
+
/** Mapping between local category and OTA room type/rate plan */
|
|
1259
|
+
interface ChannelMapping {
|
|
1260
|
+
id: string;
|
|
1261
|
+
channelId: string;
|
|
1262
|
+
localCategoryId: string;
|
|
1263
|
+
channelRoomTypeId: string | null;
|
|
1264
|
+
channelRatePlanId: string | null;
|
|
1265
|
+
settings: Record<string, unknown> | null;
|
|
1266
|
+
metadata: Record<string, unknown> | null;
|
|
1267
|
+
createdAt: string;
|
|
1268
|
+
}
|
|
1269
|
+
/** Input for creating a channel mapping */
|
|
1270
|
+
interface CreateMappingInput {
|
|
1271
|
+
localCategoryId: string;
|
|
1272
|
+
channelRoomTypeId?: string;
|
|
1273
|
+
channelRatePlanId?: string;
|
|
1274
|
+
settings?: Record<string, unknown>;
|
|
1275
|
+
metadata?: Record<string, unknown>;
|
|
1276
|
+
}
|
|
1277
|
+
/** Parameters for listing mappings */
|
|
1278
|
+
interface ListMappingsParams {
|
|
1279
|
+
localCategoryId?: string;
|
|
1280
|
+
limit?: number;
|
|
1281
|
+
cursor?: string;
|
|
1282
|
+
}
|
|
1283
|
+
/** Paginated list of channel mappings */
|
|
1284
|
+
type PaginatedMappings = Paginated<ChannelMapping>;
|
|
1285
|
+
/** Type of sync operation */
|
|
1286
|
+
type SyncOperationType = "push" | "pull";
|
|
1287
|
+
/** Status of a sync operation */
|
|
1288
|
+
type SyncOperationStatus = "pending" | "running" | "completed" | "failed";
|
|
1289
|
+
/** Statistics from a sync operation */
|
|
1290
|
+
interface SyncStats {
|
|
1291
|
+
itemsSynced: number;
|
|
1292
|
+
itemsFailed: number;
|
|
1293
|
+
warnings: string[];
|
|
1294
|
+
}
|
|
1295
|
+
/** Error encountered during sync */
|
|
1296
|
+
interface SyncError {
|
|
1297
|
+
code: string;
|
|
1298
|
+
message: string;
|
|
1299
|
+
details: Record<string, unknown> | null;
|
|
1300
|
+
}
|
|
1301
|
+
/** A sync operation record */
|
|
1302
|
+
interface SyncOperation {
|
|
1303
|
+
id: string;
|
|
1304
|
+
channelId: string;
|
|
1305
|
+
type: SyncOperationType;
|
|
1306
|
+
status: SyncOperationStatus;
|
|
1307
|
+
startedAt: string | null;
|
|
1308
|
+
completedAt: string | null;
|
|
1309
|
+
stats: SyncStats | null;
|
|
1310
|
+
errors: SyncError[];
|
|
1311
|
+
createdAt: string;
|
|
1312
|
+
}
|
|
1313
|
+
/** Input for push sync */
|
|
1314
|
+
interface PushSyncInput {
|
|
1315
|
+
dateFrom?: string;
|
|
1316
|
+
dateTo?: string;
|
|
1317
|
+
fullSync?: boolean;
|
|
1318
|
+
}
|
|
1319
|
+
/** Input for pull sync */
|
|
1320
|
+
interface PullSyncInput {
|
|
1321
|
+
dateFrom?: string;
|
|
1322
|
+
dateTo?: string;
|
|
1323
|
+
}
|
|
1324
|
+
/** Parameters for querying sync log */
|
|
1325
|
+
interface SyncLogParams {
|
|
1326
|
+
type?: SyncOperationType;
|
|
1327
|
+
status?: SyncOperationStatus;
|
|
1328
|
+
from?: string;
|
|
1329
|
+
to?: string;
|
|
1330
|
+
limit?: number;
|
|
1331
|
+
cursor?: string;
|
|
1332
|
+
}
|
|
1333
|
+
/** Paginated sync operation log */
|
|
1334
|
+
type PaginatedSyncLog = Paginated<SyncOperation>;
|
|
1335
|
+
/** Input for iCal import */
|
|
1336
|
+
interface ICalImportInput {
|
|
1337
|
+
spaceId: string;
|
|
1338
|
+
importUrl: string;
|
|
1339
|
+
name?: string;
|
|
1340
|
+
autoSync?: boolean;
|
|
1341
|
+
}
|
|
1342
|
+
/** Result of an iCal import operation */
|
|
1343
|
+
interface ICalImportResult {
|
|
1344
|
+
id: string;
|
|
1345
|
+
spaceId: string;
|
|
1346
|
+
importUrl: string;
|
|
1347
|
+
eventsImported: number;
|
|
1348
|
+
lastImportedAt: string | null;
|
|
1349
|
+
status: string;
|
|
1350
|
+
}
|
|
1351
|
+
/** Result of an iCal export operation */
|
|
1352
|
+
interface ICalExportResult {
|
|
1353
|
+
spaceId: string;
|
|
1354
|
+
exportUrl: string;
|
|
1355
|
+
lastExportedAt: string | null;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* Service for managing distribution channels in the Atzentis Booking API.
|
|
1360
|
+
*
|
|
1361
|
+
* Provides channel CRUD, mapping management, push/pull sync operations,
|
|
1362
|
+
* sync log retrieval, and iCal import/export.
|
|
1363
|
+
*
|
|
1364
|
+
* @example
|
|
1365
|
+
* ```typescript
|
|
1366
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
1367
|
+
*
|
|
1368
|
+
* // Create a Channex connection
|
|
1369
|
+
* const channel = await booking.distribution.createChannel({
|
|
1370
|
+
* propertyId: "prop_abc123",
|
|
1371
|
+
* type: "channex",
|
|
1372
|
+
* name: "Booking.com via Channex",
|
|
1373
|
+
* });
|
|
1374
|
+
*
|
|
1375
|
+
* // Push availability to channel
|
|
1376
|
+
* await booking.distribution.push(channel.id, {
|
|
1377
|
+
* dateFrom: "2025-07-01",
|
|
1378
|
+
* dateTo: "2025-12-31",
|
|
1379
|
+
* });
|
|
1380
|
+
* ```
|
|
1381
|
+
*/
|
|
1382
|
+
declare class DistributionService extends BaseService {
|
|
1383
|
+
protected readonly basePath = "/distribution/v1";
|
|
1384
|
+
/** Create a new distribution channel */
|
|
1385
|
+
createChannel(input: CreateChannelInput): Promise<Channel>;
|
|
1386
|
+
/** Get a channel by ID */
|
|
1387
|
+
getChannel(channelId: string): Promise<Channel>;
|
|
1388
|
+
/** List channels with optional filters */
|
|
1389
|
+
listChannels(params?: ListChannelsParams): Promise<PaginatedChannels>;
|
|
1390
|
+
/** Update a channel */
|
|
1391
|
+
updateChannel(channelId: string, input: UpdateChannelInput): Promise<Channel>;
|
|
1392
|
+
/** Delete a channel */
|
|
1393
|
+
deleteChannel(channelId: string): Promise<void>;
|
|
1394
|
+
/** Create a mapping between a local category and OTA room type/rate plan */
|
|
1395
|
+
createMapping(channelId: string, input: CreateMappingInput): Promise<ChannelMapping>;
|
|
1396
|
+
/** List mappings for a channel */
|
|
1397
|
+
listMappings(channelId: string, params?: ListMappingsParams): Promise<PaginatedMappings>;
|
|
1398
|
+
/** Delete a mapping */
|
|
1399
|
+
deleteMapping(channelId: string, mappingId: string): Promise<void>;
|
|
1400
|
+
/** Push availability and rates to a channel */
|
|
1401
|
+
push(channelId: string, input?: PushSyncInput): Promise<SyncOperation>;
|
|
1402
|
+
/** Pull reservations from a channel */
|
|
1403
|
+
pull(channelId: string, input?: PullSyncInput): Promise<SyncOperation>;
|
|
1404
|
+
/** Get sync operation log for a channel */
|
|
1405
|
+
getSyncLog(channelId: string, params?: SyncLogParams): Promise<PaginatedSyncLog>;
|
|
1406
|
+
/** Import availability from an external iCal feed */
|
|
1407
|
+
icalImport(input: ICalImportInput): Promise<ICalImportResult>;
|
|
1408
|
+
/** Get iCal export URL for a space */
|
|
1409
|
+
icalExport(spaceId: string): Promise<ICalExportResult>;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/** Status of a folio */
|
|
1413
|
+
type FolioStatus = "open" | "closed" | "settled";
|
|
1414
|
+
/** A guest folio (accounting record) */
|
|
1415
|
+
interface Folio {
|
|
1416
|
+
id: string;
|
|
1417
|
+
bookingId: string;
|
|
1418
|
+
guestId: string | null;
|
|
1419
|
+
status: FolioStatus;
|
|
1420
|
+
balance: number;
|
|
1421
|
+
totalCharges: number;
|
|
1422
|
+
totalPayments: number;
|
|
1423
|
+
currency: string;
|
|
1424
|
+
metadata: Record<string, unknown> | null;
|
|
1425
|
+
createdAt: string;
|
|
1426
|
+
updatedAt: string;
|
|
1427
|
+
closedAt: string | null;
|
|
1428
|
+
settledAt: string | null;
|
|
1429
|
+
}
|
|
1430
|
+
/** Input for creating a folio */
|
|
1431
|
+
interface CreateFolioInput {
|
|
1432
|
+
bookingId: string;
|
|
1433
|
+
guestId?: string;
|
|
1434
|
+
currency?: string;
|
|
1435
|
+
metadata?: Record<string, unknown>;
|
|
1436
|
+
}
|
|
1437
|
+
/** Input for updating a folio */
|
|
1438
|
+
interface UpdateFolioInput {
|
|
1439
|
+
guestId?: string;
|
|
1440
|
+
metadata?: Record<string, unknown>;
|
|
1441
|
+
}
|
|
1442
|
+
/** Parameters for listing folios */
|
|
1443
|
+
interface ListFoliosParams {
|
|
1444
|
+
bookingId?: string;
|
|
1445
|
+
guestId?: string;
|
|
1446
|
+
status?: FolioStatus;
|
|
1447
|
+
limit?: number;
|
|
1448
|
+
cursor?: string;
|
|
1449
|
+
}
|
|
1450
|
+
/** Paginated list of folios */
|
|
1451
|
+
type PaginatedFolios = Paginated<Folio>;
|
|
1452
|
+
/** Type of charge applied to a folio */
|
|
1453
|
+
type ChargeType = "room" | "minibar" | "restaurant" | "spa" | "parking" | "telephone" | "laundry" | "pos" | "other";
|
|
1454
|
+
/** A charge on a folio */
|
|
1455
|
+
interface FolioCharge {
|
|
1456
|
+
id: string;
|
|
1457
|
+
folioId: string;
|
|
1458
|
+
type: ChargeType;
|
|
1459
|
+
description: string | null;
|
|
1460
|
+
amount: number;
|
|
1461
|
+
currency: string;
|
|
1462
|
+
transitory: boolean;
|
|
1463
|
+
metadata: Record<string, unknown> | null;
|
|
1464
|
+
createdAt: string;
|
|
1465
|
+
}
|
|
1466
|
+
/** Input for creating a charge */
|
|
1467
|
+
interface CreateChargeInput {
|
|
1468
|
+
type: ChargeType;
|
|
1469
|
+
amount: number;
|
|
1470
|
+
description?: string;
|
|
1471
|
+
currency?: string;
|
|
1472
|
+
metadata?: Record<string, unknown>;
|
|
1473
|
+
}
|
|
1474
|
+
/** Parameters for listing charges */
|
|
1475
|
+
interface ListChargesParams {
|
|
1476
|
+
type?: ChargeType;
|
|
1477
|
+
limit?: number;
|
|
1478
|
+
cursor?: string;
|
|
1479
|
+
}
|
|
1480
|
+
/** Paginated list of charges */
|
|
1481
|
+
type PaginatedCharges = Paginated<FolioCharge>;
|
|
1482
|
+
/** Input for moving charges between folios */
|
|
1483
|
+
interface MoveChargesInput {
|
|
1484
|
+
chargeIds: string[];
|
|
1485
|
+
toFolioId: string;
|
|
1486
|
+
}
|
|
1487
|
+
/** A payment applied to a folio */
|
|
1488
|
+
interface FolioPayment {
|
|
1489
|
+
id: string;
|
|
1490
|
+
folioId: string;
|
|
1491
|
+
amount: number;
|
|
1492
|
+
currency: string;
|
|
1493
|
+
method: string;
|
|
1494
|
+
reference: string | null;
|
|
1495
|
+
metadata: Record<string, unknown> | null;
|
|
1496
|
+
createdAt: string;
|
|
1497
|
+
}
|
|
1498
|
+
/** Input for creating a folio payment */
|
|
1499
|
+
interface CreateFolioPaymentInput {
|
|
1500
|
+
amount: number;
|
|
1501
|
+
method: string;
|
|
1502
|
+
reference?: string;
|
|
1503
|
+
currency?: string;
|
|
1504
|
+
metadata?: Record<string, unknown>;
|
|
1505
|
+
}
|
|
1506
|
+
/** Parameters for listing folio payments */
|
|
1507
|
+
interface ListFolioPaymentsParams {
|
|
1508
|
+
limit?: number;
|
|
1509
|
+
cursor?: string;
|
|
1510
|
+
}
|
|
1511
|
+
/** Paginated list of folio payments */
|
|
1512
|
+
type PaginatedFolioPayments = Paginated<FolioPayment>;
|
|
1513
|
+
/** Status of an invoice */
|
|
1514
|
+
type InvoiceStatus = "draft" | "finalized" | "voided";
|
|
1515
|
+
/** A fiscal invoice */
|
|
1516
|
+
interface Invoice {
|
|
1517
|
+
id: string;
|
|
1518
|
+
folioId: string;
|
|
1519
|
+
number: string;
|
|
1520
|
+
status: InvoiceStatus;
|
|
1521
|
+
amount: number;
|
|
1522
|
+
currency: string;
|
|
1523
|
+
language: string;
|
|
1524
|
+
fiscalId: string | null;
|
|
1525
|
+
metadata: Record<string, unknown> | null;
|
|
1526
|
+
createdAt: string;
|
|
1527
|
+
finalizedAt: string | null;
|
|
1528
|
+
}
|
|
1529
|
+
/** Input for generating an invoice */
|
|
1530
|
+
interface CreateInvoiceInput {
|
|
1531
|
+
language?: string;
|
|
1532
|
+
metadata?: Record<string, unknown>;
|
|
1533
|
+
}
|
|
1534
|
+
/** Daily accounting report */
|
|
1535
|
+
interface AccountingDailyReport {
|
|
1536
|
+
date: string;
|
|
1537
|
+
totalRevenue: number;
|
|
1538
|
+
totalCharges: number;
|
|
1539
|
+
totalPayments: number;
|
|
1540
|
+
breakdown: Record<string, number>;
|
|
1541
|
+
}
|
|
1542
|
+
/** Revenue report by charge type */
|
|
1543
|
+
interface AccountingRevenueReport {
|
|
1544
|
+
period: {
|
|
1545
|
+
from: string;
|
|
1546
|
+
to: string;
|
|
1547
|
+
};
|
|
1548
|
+
breakdown: Record<string, number>;
|
|
1549
|
+
}
|
|
1550
|
+
/** VAT breakdown entry */
|
|
1551
|
+
interface VatBreakdownEntry {
|
|
1552
|
+
net: number;
|
|
1553
|
+
vat: number;
|
|
1554
|
+
gross: number;
|
|
1555
|
+
}
|
|
1556
|
+
/** VAT accounting report */
|
|
1557
|
+
interface AccountingVatReport {
|
|
1558
|
+
period: {
|
|
1559
|
+
from: string;
|
|
1560
|
+
to: string;
|
|
1561
|
+
};
|
|
1562
|
+
breakdown: Record<string, VatBreakdownEntry>;
|
|
1563
|
+
}
|
|
1564
|
+
/** Parameters for accounting reports */
|
|
1565
|
+
interface AccountingReportParams {
|
|
1566
|
+
date?: string;
|
|
1567
|
+
from?: string;
|
|
1568
|
+
to?: string;
|
|
1569
|
+
propertyId?: string;
|
|
1570
|
+
}
|
|
1571
|
+
/** A line item in a POS order */
|
|
1572
|
+
interface FolioPostItem {
|
|
1573
|
+
name: string;
|
|
1574
|
+
quantity: number;
|
|
1575
|
+
unitPrice: number;
|
|
1576
|
+
category: string;
|
|
1577
|
+
}
|
|
1578
|
+
/** Input for posting a POS charge to a folio */
|
|
1579
|
+
interface FolioPostInput {
|
|
1580
|
+
folioId: string;
|
|
1581
|
+
posOrderId: string;
|
|
1582
|
+
amount: number;
|
|
1583
|
+
posTerminalId?: string;
|
|
1584
|
+
items?: FolioPostItem[];
|
|
1585
|
+
description?: string;
|
|
1586
|
+
currency?: string;
|
|
1587
|
+
metadata?: Record<string, unknown>;
|
|
1588
|
+
}
|
|
1589
|
+
/** Result of posting a POS charge */
|
|
1590
|
+
interface FolioPostResult {
|
|
1591
|
+
chargeId: string;
|
|
1592
|
+
folioId: string;
|
|
1593
|
+
posOrderId: string;
|
|
1594
|
+
amount: number;
|
|
1595
|
+
status: "posted";
|
|
1596
|
+
postedAt: string;
|
|
1597
|
+
}
|
|
1598
|
+
/** A POS charge with full provenance metadata */
|
|
1599
|
+
interface FolioPostCharge {
|
|
1600
|
+
chargeId: string;
|
|
1601
|
+
folioId: string;
|
|
1602
|
+
posOrderId: string;
|
|
1603
|
+
posTerminalId: string | null;
|
|
1604
|
+
amount: number;
|
|
1605
|
+
description: string | null;
|
|
1606
|
+
items: FolioPostItem[];
|
|
1607
|
+
currency: string;
|
|
1608
|
+
postedAt: string;
|
|
1609
|
+
metadata: Record<string, unknown> | null;
|
|
1610
|
+
}
|
|
1611
|
+
/** Parameters for listing POS charges on a folio */
|
|
1612
|
+
interface ListFolioPostParams {
|
|
1613
|
+
posTerminalId?: string;
|
|
1614
|
+
from?: string;
|
|
1615
|
+
to?: string;
|
|
1616
|
+
limit?: number;
|
|
1617
|
+
cursor?: string;
|
|
1618
|
+
}
|
|
1619
|
+
/** Paginated list of POS charges */
|
|
1620
|
+
type PaginatedFolioPostCharges = Paginated<FolioPostCharge>;
|
|
1621
|
+
|
|
1622
|
+
/**
|
|
1623
|
+
* Service for financial operations in the Atzentis Booking API.
|
|
1624
|
+
*
|
|
1625
|
+
* Manages the full folio lifecycle (open → close → settle), charges,
|
|
1626
|
+
* folio payments, invoices (including PDF export), and accounting reports.
|
|
1627
|
+
*
|
|
1628
|
+
* @example
|
|
1629
|
+
* ```typescript
|
|
1630
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
1631
|
+
*
|
|
1632
|
+
* // Create a folio for a booking
|
|
1633
|
+
* const folio = await booking.finance.createFolio({
|
|
1634
|
+
* bookingId: "bk_abc123",
|
|
1635
|
+
* currency: "EUR",
|
|
1636
|
+
* });
|
|
1637
|
+
*
|
|
1638
|
+
* // Add a room charge
|
|
1639
|
+
* await booking.finance.createCharge(folio.id, {
|
|
1640
|
+
* type: "room",
|
|
1641
|
+
* amount: 10000,
|
|
1642
|
+
* });
|
|
1643
|
+
*
|
|
1644
|
+
* // Close and settle
|
|
1645
|
+
* await booking.finance.closeFolio(folio.id);
|
|
1646
|
+
* await booking.finance.settleFolio(folio.id);
|
|
1647
|
+
* ```
|
|
1648
|
+
*/
|
|
1649
|
+
declare class FinanceService extends BaseService {
|
|
1650
|
+
protected readonly basePath = "/finance/v1";
|
|
1651
|
+
/** Create a new folio for a booking */
|
|
1652
|
+
createFolio(input: CreateFolioInput): Promise<Folio>;
|
|
1653
|
+
/** Get a folio by ID */
|
|
1654
|
+
getFolio(folioId: string): Promise<Folio>;
|
|
1655
|
+
/** List folios with optional filters */
|
|
1656
|
+
listFolios(params?: ListFoliosParams): Promise<PaginatedFolios>;
|
|
1657
|
+
/** Update a folio */
|
|
1658
|
+
updateFolio(folioId: string, input: UpdateFolioInput): Promise<Folio>;
|
|
1659
|
+
/** Close a folio (no more charges can be added) */
|
|
1660
|
+
closeFolio(folioId: string): Promise<Folio>;
|
|
1661
|
+
/** Settle a folio (mark as fully paid) */
|
|
1662
|
+
settleFolio(folioId: string): Promise<Folio>;
|
|
1663
|
+
/** Create a charge on a folio */
|
|
1664
|
+
createCharge(folioId: string, input: CreateChargeInput): Promise<FolioCharge>;
|
|
1665
|
+
/** List charges on a folio */
|
|
1666
|
+
listCharges(folioId: string, params?: ListChargesParams): Promise<PaginatedCharges>;
|
|
1667
|
+
/** Create a transitory (non-billable) charge on a folio */
|
|
1668
|
+
createTransitoryCharge(folioId: string, input: CreateChargeInput): Promise<FolioCharge>;
|
|
1669
|
+
/** Move charges from one folio to another */
|
|
1670
|
+
moveCharges(folioId: string, input: MoveChargesInput): Promise<{
|
|
1671
|
+
moved: number;
|
|
1672
|
+
}>;
|
|
1673
|
+
/** Record a payment on a folio */
|
|
1674
|
+
createFolioPayment(folioId: string, input: CreateFolioPaymentInput): Promise<FolioPayment>;
|
|
1675
|
+
/** List payments on a folio */
|
|
1676
|
+
listFolioPayments(folioId: string, params?: ListFolioPaymentsParams): Promise<PaginatedFolioPayments>;
|
|
1677
|
+
/** Generate an invoice for a folio */
|
|
1678
|
+
generateInvoice(folioId: string, input?: CreateInvoiceInput): Promise<Invoice>;
|
|
1679
|
+
/** Get an invoice by ID */
|
|
1680
|
+
getInvoice(invoiceId: string): Promise<Invoice>;
|
|
1681
|
+
/** Get invoice as PDF binary data */
|
|
1682
|
+
getInvoicePdf(invoiceId: string): Promise<ArrayBuffer>;
|
|
1683
|
+
/** Get daily accounting report */
|
|
1684
|
+
getDailyReport(params?: AccountingReportParams): Promise<AccountingDailyReport>;
|
|
1685
|
+
/** Get revenue report by charge type */
|
|
1686
|
+
getRevenueReport(params?: AccountingReportParams): Promise<AccountingRevenueReport>;
|
|
1687
|
+
/** Get VAT accounting report */
|
|
1688
|
+
getVatReport(params?: AccountingReportParams): Promise<AccountingVatReport>;
|
|
1689
|
+
/** Post a POS charge to a guest folio */
|
|
1690
|
+
folioPost(input: FolioPostInput): Promise<FolioPostResult>;
|
|
1691
|
+
/** List POS charges on a folio */
|
|
1692
|
+
listFolioPostCharges(folioId: string, params?: ListFolioPostParams): Promise<PaginatedFolioPostCharges>;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/** Type of group booking */
|
|
1696
|
+
type GroupType = "wedding" | "conference" | "corporate" | "tour" | "other";
|
|
1697
|
+
/** Status of a group booking */
|
|
1698
|
+
type GroupStatus = "tentative" | "definite" | "cancelled";
|
|
1699
|
+
/** A single date entry in a block with room count and rate */
|
|
1700
|
+
interface BlockDate {
|
|
1701
|
+
date: string;
|
|
1702
|
+
count: number;
|
|
1703
|
+
rate: number;
|
|
1704
|
+
}
|
|
1705
|
+
/** Summary of block allocation for a group */
|
|
1706
|
+
interface GroupBlockSummary {
|
|
1707
|
+
totalRooms: number;
|
|
1708
|
+
pickedUp: number;
|
|
1709
|
+
remaining: number;
|
|
1710
|
+
}
|
|
1711
|
+
/** A room block within a group booking */
|
|
1712
|
+
interface Block {
|
|
1713
|
+
id: string;
|
|
1714
|
+
groupId: string;
|
|
1715
|
+
categoryId: string;
|
|
1716
|
+
dates: BlockDate[];
|
|
1717
|
+
totalRooms: number;
|
|
1718
|
+
pickedUp: number;
|
|
1719
|
+
remaining: number;
|
|
1720
|
+
notes: string | null;
|
|
1721
|
+
metadata: Record<string, unknown> | null;
|
|
1722
|
+
createdAt: string;
|
|
1723
|
+
updatedAt: string;
|
|
1724
|
+
}
|
|
1725
|
+
/** A group booking entity */
|
|
1726
|
+
interface Group {
|
|
1727
|
+
id: string;
|
|
1728
|
+
propertyId: string;
|
|
1729
|
+
name: string;
|
|
1730
|
+
type: GroupType;
|
|
1731
|
+
status: GroupStatus;
|
|
1732
|
+
contactName: string | null;
|
|
1733
|
+
contactEmail: string | null;
|
|
1734
|
+
contactPhone: string | null;
|
|
1735
|
+
checkIn: string | null;
|
|
1736
|
+
checkOut: string | null;
|
|
1737
|
+
cutoffDate: string | null;
|
|
1738
|
+
blockSummary: GroupBlockSummary;
|
|
1739
|
+
folioId: string | null;
|
|
1740
|
+
notes: string | null;
|
|
1741
|
+
metadata: Record<string, unknown> | null;
|
|
1742
|
+
createdAt: string;
|
|
1743
|
+
updatedAt: string;
|
|
1744
|
+
}
|
|
1745
|
+
/** Pickup data broken down by category */
|
|
1746
|
+
interface CategoryPickup {
|
|
1747
|
+
categoryId: string;
|
|
1748
|
+
categoryName: string;
|
|
1749
|
+
blocked: number;
|
|
1750
|
+
pickedUp: number;
|
|
1751
|
+
remaining: number;
|
|
1752
|
+
}
|
|
1753
|
+
/** Pickup data broken down by date */
|
|
1754
|
+
interface DatePickup {
|
|
1755
|
+
date: string;
|
|
1756
|
+
blocked: number;
|
|
1757
|
+
pickedUp: number;
|
|
1758
|
+
remaining: number;
|
|
1759
|
+
}
|
|
1760
|
+
/** Pickup tracking data for a group */
|
|
1761
|
+
interface Pickup {
|
|
1762
|
+
groupId: string;
|
|
1763
|
+
totalBlocked: number;
|
|
1764
|
+
totalPickedUp: number;
|
|
1765
|
+
totalRemaining: number;
|
|
1766
|
+
pickupPercent: number;
|
|
1767
|
+
byCategory: CategoryPickup[];
|
|
1768
|
+
byDate: DatePickup[];
|
|
1769
|
+
}
|
|
1770
|
+
/** Result of a block release operation */
|
|
1771
|
+
interface ReleaseResult {
|
|
1772
|
+
groupId: string;
|
|
1773
|
+
releasedCount: number;
|
|
1774
|
+
remainingBlocked: number;
|
|
1775
|
+
releasedAt: string;
|
|
1776
|
+
}
|
|
1777
|
+
/** Result of creating a group folio */
|
|
1778
|
+
interface GroupFolioResult {
|
|
1779
|
+
groupId: string;
|
|
1780
|
+
folioId: string;
|
|
1781
|
+
status: string;
|
|
1782
|
+
createdAt: string;
|
|
1783
|
+
}
|
|
1784
|
+
/** Input for creating a group booking */
|
|
1785
|
+
interface CreateGroupInput {
|
|
1786
|
+
propertyId: string;
|
|
1787
|
+
name: string;
|
|
1788
|
+
type?: GroupType;
|
|
1789
|
+
contactName?: string;
|
|
1790
|
+
contactEmail?: string;
|
|
1791
|
+
contactPhone?: string;
|
|
1792
|
+
checkIn?: string;
|
|
1793
|
+
checkOut?: string;
|
|
1794
|
+
cutoffDate?: string;
|
|
1795
|
+
notes?: string;
|
|
1796
|
+
metadata?: Record<string, unknown>;
|
|
1797
|
+
}
|
|
1798
|
+
/** Input for updating a group booking */
|
|
1799
|
+
interface UpdateGroupInput {
|
|
1800
|
+
name?: string;
|
|
1801
|
+
type?: GroupType;
|
|
1802
|
+
status?: GroupStatus;
|
|
1803
|
+
contactName?: string;
|
|
1804
|
+
contactEmail?: string;
|
|
1805
|
+
contactPhone?: string;
|
|
1806
|
+
checkIn?: string;
|
|
1807
|
+
checkOut?: string;
|
|
1808
|
+
cutoffDate?: string;
|
|
1809
|
+
notes?: string;
|
|
1810
|
+
metadata?: Record<string, unknown>;
|
|
1811
|
+
}
|
|
1812
|
+
/** Input for creating a room block */
|
|
1813
|
+
interface CreateBlockInput {
|
|
1814
|
+
categoryId: string;
|
|
1815
|
+
dates: BlockDate[];
|
|
1816
|
+
notes?: string;
|
|
1817
|
+
metadata?: Record<string, unknown>;
|
|
1818
|
+
}
|
|
1819
|
+
/** Input for releasing blocks */
|
|
1820
|
+
interface ReleaseBlocksInput {
|
|
1821
|
+
count?: number;
|
|
1822
|
+
categoryId?: string;
|
|
1823
|
+
notes?: string;
|
|
1824
|
+
}
|
|
1825
|
+
/** Input for creating a group folio */
|
|
1826
|
+
interface CreateGroupFolioInput {
|
|
1827
|
+
billingName?: string;
|
|
1828
|
+
billingAddress?: string;
|
|
1829
|
+
notes?: string;
|
|
1830
|
+
}
|
|
1831
|
+
/** Parameters for listing groups */
|
|
1832
|
+
interface ListGroupsParams {
|
|
1833
|
+
propertyId: string;
|
|
1834
|
+
status?: GroupStatus | GroupStatus[];
|
|
1835
|
+
type?: GroupType | GroupType[];
|
|
1836
|
+
search?: string;
|
|
1837
|
+
limit?: number;
|
|
1838
|
+
cursor?: string;
|
|
1839
|
+
}
|
|
1840
|
+
/** Paginated list of groups */
|
|
1841
|
+
type PaginatedGroups = Paginated<Group>;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* Service for group booking operations in the Atzentis Booking API.
|
|
1845
|
+
*
|
|
1846
|
+
* Provides group CRUD, room block management, pickup tracking,
|
|
1847
|
+
* block release operations, and group folio creation.
|
|
1848
|
+
*
|
|
1849
|
+
* @example
|
|
1850
|
+
* ```typescript
|
|
1851
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
1852
|
+
*
|
|
1853
|
+
* // Create a conference group
|
|
1854
|
+
* const group = await booking.groups.create({
|
|
1855
|
+
* propertyId: "prop_abc123",
|
|
1856
|
+
* name: "Tech Conference 2025",
|
|
1857
|
+
* type: "conference",
|
|
1858
|
+
* });
|
|
1859
|
+
*
|
|
1860
|
+
* // Add a room block
|
|
1861
|
+
* const block = await booking.groups.createBlock(group.id, {
|
|
1862
|
+
* categoryId: "cat_std",
|
|
1863
|
+
* dates: [
|
|
1864
|
+
* { date: "2025-09-15", count: 20, rate: 12000 },
|
|
1865
|
+
* { date: "2025-09-16", count: 20, rate: 12000 },
|
|
1866
|
+
* ],
|
|
1867
|
+
* });
|
|
1868
|
+
*
|
|
1869
|
+
* // Track pickup and release remaining
|
|
1870
|
+
* const pickup = await booking.groups.getPickup(group.id);
|
|
1871
|
+
* await booking.groups.release(group.id, { count: 5 });
|
|
1872
|
+
* ```
|
|
1873
|
+
*/
|
|
1874
|
+
declare class GroupsService extends BaseService {
|
|
1875
|
+
protected readonly basePath = "/booking/v1/groups";
|
|
1876
|
+
/** Create a group booking */
|
|
1877
|
+
create(input: CreateGroupInput): Promise<Group>;
|
|
1878
|
+
/** Get a group booking by ID */
|
|
1879
|
+
get(groupId: string): Promise<Group>;
|
|
1880
|
+
/** List group bookings with filters */
|
|
1881
|
+
list(params: ListGroupsParams): Promise<PaginatedGroups>;
|
|
1882
|
+
/** Update a group booking */
|
|
1883
|
+
update(groupId: string, input: UpdateGroupInput): Promise<Group>;
|
|
1884
|
+
/** Delete a group booking */
|
|
1885
|
+
delete(groupId: string): Promise<void>;
|
|
1886
|
+
/** Create a room block for a group */
|
|
1887
|
+
createBlock(groupId: string, input: CreateBlockInput): Promise<Block>;
|
|
1888
|
+
/** List blocks for a group */
|
|
1889
|
+
listBlocks(groupId: string): Promise<Block[]>;
|
|
1890
|
+
/** Get pickup tracking data for a group */
|
|
1891
|
+
getPickup(groupId: string): Promise<Pickup>;
|
|
1892
|
+
/** Release blocks back to inventory */
|
|
1893
|
+
release(groupId: string, input?: ReleaseBlocksInput): Promise<ReleaseResult>;
|
|
1894
|
+
/** Create a master folio for a group */
|
|
1895
|
+
createFolio(groupId: string, input?: CreateGroupFolioInput): Promise<GroupFolioResult>;
|
|
1896
|
+
}
|
|
1897
|
+
|
|
1200
1898
|
/** Guest address */
|
|
1201
1899
|
interface GuestAddress {
|
|
1202
1900
|
/** Street address */
|
|
@@ -1772,45 +2470,564 @@ declare class GuestsService extends BaseService {
|
|
|
1772
2470
|
private _buildHistoryQuery;
|
|
1773
2471
|
}
|
|
1774
2472
|
|
|
1775
|
-
/**
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
*/
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
2473
|
+
/** Housekeeping status of a space */
|
|
2474
|
+
type HousekeepingStatus = "dirty" | "clean" | "inspected" | "out_of_order" | "out_of_service";
|
|
2475
|
+
/** Occupancy status of a space */
|
|
2476
|
+
type OccupancyStatus = "vacant" | "occupied" | "due_out" | "due_in";
|
|
2477
|
+
/** Priority level for housekeeping tasks */
|
|
2478
|
+
type HousekeepingPriority = "normal" | "rush" | "vip";
|
|
2479
|
+
/** A single entry on the housekeeping board */
|
|
2480
|
+
interface HousekeepingBoardEntry {
|
|
2481
|
+
spaceId: string;
|
|
2482
|
+
spaceName: string;
|
|
2483
|
+
spaceType: string;
|
|
2484
|
+
floor: number;
|
|
2485
|
+
status: HousekeepingStatus;
|
|
2486
|
+
occupancyStatus: OccupancyStatus;
|
|
2487
|
+
priority: HousekeepingPriority;
|
|
2488
|
+
assignedTo: string | null;
|
|
2489
|
+
notes: string | null;
|
|
2490
|
+
lastStatusChange: string;
|
|
2491
|
+
}
|
|
2492
|
+
/** The housekeeping board for a property */
|
|
2493
|
+
interface HousekeepingBoard {
|
|
2494
|
+
spaces: HousekeepingBoardEntry[];
|
|
2495
|
+
propertyId: string;
|
|
2496
|
+
updatedAt: string;
|
|
2497
|
+
}
|
|
2498
|
+
/** Parameters for retrieving the housekeeping board */
|
|
2499
|
+
interface GetBoardParams {
|
|
2500
|
+
propertyId?: string;
|
|
2501
|
+
floor?: number;
|
|
2502
|
+
status?: HousekeepingStatus;
|
|
2503
|
+
assignedTo?: string;
|
|
2504
|
+
}
|
|
2505
|
+
/** Input for updating a space's housekeeping status */
|
|
2506
|
+
interface UpdateSpaceStatusInput {
|
|
2507
|
+
status: HousekeepingStatus;
|
|
2508
|
+
notes?: string;
|
|
2509
|
+
assignedTo?: string;
|
|
2510
|
+
priority?: HousekeepingPriority;
|
|
2511
|
+
}
|
|
2512
|
+
/** Type of housekeeping task */
|
|
2513
|
+
type HousekeepingTaskType = "cleaning" | "deep_cleaning" | "turnover" | "inspection" | "maintenance" | "other";
|
|
2514
|
+
/** Status of a housekeeping task */
|
|
2515
|
+
type HousekeepingTaskStatus = "pending" | "in_progress" | "completed" | "cancelled";
|
|
2516
|
+
/** A housekeeping task assigned to a space */
|
|
2517
|
+
interface HousekeepingTask {
|
|
2518
|
+
id: string;
|
|
2519
|
+
spaceId: string;
|
|
2520
|
+
type: HousekeepingTaskType;
|
|
2521
|
+
status: HousekeepingTaskStatus;
|
|
2522
|
+
description: string | null;
|
|
2523
|
+
assignedTo: string | null;
|
|
2524
|
+
priority: HousekeepingPriority;
|
|
2525
|
+
dueAt: string | null;
|
|
2526
|
+
notes: string | null;
|
|
2527
|
+
metadata: Record<string, unknown> | null;
|
|
2528
|
+
createdAt: string;
|
|
2529
|
+
updatedAt: string;
|
|
2530
|
+
completedAt: string | null;
|
|
2531
|
+
}
|
|
2532
|
+
/** Input for creating a housekeeping task */
|
|
2533
|
+
interface CreateHousekeepingTaskInput {
|
|
2534
|
+
spaceId: string;
|
|
2535
|
+
type: HousekeepingTaskType;
|
|
2536
|
+
description?: string;
|
|
2537
|
+
assignedTo?: string;
|
|
2538
|
+
priority?: HousekeepingPriority;
|
|
2539
|
+
dueAt?: string;
|
|
2540
|
+
metadata?: Record<string, unknown>;
|
|
2541
|
+
}
|
|
2542
|
+
/** Input for updating a housekeeping task */
|
|
2543
|
+
interface UpdateHousekeepingTaskInput {
|
|
2544
|
+
status?: HousekeepingTaskStatus;
|
|
2545
|
+
description?: string;
|
|
2546
|
+
assignedTo?: string;
|
|
2547
|
+
priority?: HousekeepingPriority;
|
|
2548
|
+
dueAt?: string;
|
|
2549
|
+
notes?: string;
|
|
2550
|
+
metadata?: Record<string, unknown>;
|
|
2551
|
+
}
|
|
2552
|
+
/** Parameters for listing housekeeping tasks */
|
|
2553
|
+
interface ListHousekeepingTasksParams {
|
|
2554
|
+
spaceId?: string;
|
|
2555
|
+
status?: HousekeepingTaskStatus;
|
|
2556
|
+
type?: HousekeepingTaskType;
|
|
2557
|
+
assignedTo?: string;
|
|
2558
|
+
priority?: HousekeepingPriority;
|
|
2559
|
+
limit?: number;
|
|
2560
|
+
cursor?: string;
|
|
2561
|
+
}
|
|
2562
|
+
/** Paginated list of housekeeping tasks */
|
|
2563
|
+
type PaginatedHousekeepingTasks = Paginated<HousekeepingTask>;
|
|
2564
|
+
/** Status of a night audit run */
|
|
2565
|
+
type NightAuditStatus = "pending" | "in_progress" | "completed" | "failed";
|
|
2566
|
+
/** Summary statistics from a night audit run */
|
|
2567
|
+
interface NightAuditSummary {
|
|
2568
|
+
totalChargesPosted: number;
|
|
2569
|
+
totalPaymentsReconciled: number;
|
|
2570
|
+
totalRevenue: number;
|
|
2571
|
+
currency: string;
|
|
2572
|
+
discrepancyCount: number;
|
|
2573
|
+
}
|
|
2574
|
+
/** An error that occurred during a night audit run */
|
|
2575
|
+
interface NightAuditError {
|
|
2576
|
+
code: string;
|
|
2577
|
+
message: string;
|
|
2578
|
+
details: Record<string, unknown> | null;
|
|
2579
|
+
}
|
|
2580
|
+
/** A night audit run record */
|
|
2581
|
+
interface NightAuditRun {
|
|
2582
|
+
id: string;
|
|
2583
|
+
propertyId: string;
|
|
2584
|
+
businessDate: string;
|
|
2585
|
+
status: NightAuditStatus;
|
|
2586
|
+
summary: NightAuditSummary | null;
|
|
2587
|
+
startedAt: string;
|
|
2588
|
+
completedAt: string | null;
|
|
2589
|
+
notes: string | null;
|
|
2590
|
+
errors: NightAuditError[];
|
|
2591
|
+
dryRun: boolean;
|
|
2592
|
+
createdAt: string;
|
|
2593
|
+
}
|
|
2594
|
+
/** Input for running a night audit */
|
|
2595
|
+
interface RunNightAuditInput {
|
|
2596
|
+
propertyId: string;
|
|
2597
|
+
businessDate?: string;
|
|
2598
|
+
dryRun?: boolean;
|
|
2599
|
+
notes?: string;
|
|
2600
|
+
}
|
|
2601
|
+
/** Parameters for retrieving night audit history */
|
|
2602
|
+
interface GetNightAuditHistoryParams {
|
|
2603
|
+
propertyId?: string;
|
|
2604
|
+
status?: NightAuditStatus;
|
|
2605
|
+
fromDate?: string;
|
|
2606
|
+
toDate?: string;
|
|
2607
|
+
limit?: number;
|
|
2608
|
+
cursor?: string;
|
|
2609
|
+
}
|
|
2610
|
+
/** Paginated list of night audit runs */
|
|
2611
|
+
type PaginatedNightAuditRuns = Paginated<NightAuditRun>;
|
|
2612
|
+
/** Revenue breakdown by category */
|
|
2613
|
+
interface NightAuditRevenueBreakdown {
|
|
2614
|
+
category: string;
|
|
2615
|
+
amount: number;
|
|
2616
|
+
count: number;
|
|
2617
|
+
}
|
|
2618
|
+
/** Revenue section of a night audit report */
|
|
2619
|
+
interface NightAuditRevenue {
|
|
2620
|
+
totalRevenue: number;
|
|
2621
|
+
roomRevenue: number;
|
|
2622
|
+
fbRevenue: number;
|
|
2623
|
+
otherRevenue: number;
|
|
2624
|
+
currency: string;
|
|
2625
|
+
breakdown: NightAuditRevenueBreakdown[];
|
|
2626
|
+
}
|
|
2627
|
+
/** Occupancy statistics from a night audit */
|
|
2628
|
+
interface NightAuditOccupancy {
|
|
2629
|
+
totalSpaces: number;
|
|
2630
|
+
occupiedSpaces: number;
|
|
2631
|
+
occupancyRate: number;
|
|
2632
|
+
arrivals: number;
|
|
2633
|
+
departures: number;
|
|
2634
|
+
stayovers: number;
|
|
2635
|
+
noShows: number;
|
|
2636
|
+
}
|
|
2637
|
+
/** Payment method breakdown */
|
|
2638
|
+
interface NightAuditPaymentMethod {
|
|
2639
|
+
method: string;
|
|
2640
|
+
amount: number;
|
|
2641
|
+
count: number;
|
|
2642
|
+
}
|
|
2643
|
+
/** Payments section of a night audit report */
|
|
2644
|
+
interface NightAuditPayments {
|
|
2645
|
+
totalCollected: number;
|
|
2646
|
+
totalPending: number;
|
|
2647
|
+
totalRefunded: number;
|
|
2648
|
+
currency: string;
|
|
2649
|
+
byMethod: NightAuditPaymentMethod[];
|
|
2650
|
+
}
|
|
2651
|
+
/** A discrepancy found during night audit */
|
|
2652
|
+
interface NightAuditDiscrepancy {
|
|
2653
|
+
description: string;
|
|
2654
|
+
amount: number;
|
|
2655
|
+
currency: string;
|
|
2656
|
+
relatedId: string | null;
|
|
2657
|
+
relatedType: string | null;
|
|
2658
|
+
}
|
|
2659
|
+
/** Full night audit report with revenue, occupancy, payments, and discrepancies */
|
|
2660
|
+
interface NightAuditReport {
|
|
2661
|
+
auditId: string;
|
|
2662
|
+
propertyId: string;
|
|
2663
|
+
businessDate: string;
|
|
2664
|
+
revenue: NightAuditRevenue;
|
|
2665
|
+
occupancy: NightAuditOccupancy;
|
|
2666
|
+
payments: NightAuditPayments;
|
|
2667
|
+
discrepancies: NightAuditDiscrepancy[];
|
|
2668
|
+
generatedAt: string;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* Service for housekeeping operations in the Atzentis Booking API.
|
|
2673
|
+
*
|
|
2674
|
+
* Provides board retrieval with filtering, space status updates,
|
|
2675
|
+
* and housekeeping task CRUD with assignment and priority tracking.
|
|
2676
|
+
*
|
|
2677
|
+
* @example
|
|
2678
|
+
* ```typescript
|
|
2679
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2680
|
+
*
|
|
2681
|
+
* // Get the housekeeping board for floor 2
|
|
2682
|
+
* const board = await booking.housekeeping.getBoard({ floor: 2 });
|
|
2683
|
+
*
|
|
2684
|
+
* // Mark a space as clean
|
|
2685
|
+
* await booking.housekeeping.updateSpaceStatus("space_1", {
|
|
2686
|
+
* status: "clean",
|
|
2687
|
+
* notes: "Deep cleaned",
|
|
2688
|
+
* });
|
|
2689
|
+
*
|
|
2690
|
+
* // Create a cleaning task
|
|
2691
|
+
* await booking.housekeeping.createTask({
|
|
2692
|
+
* spaceId: "space_1",
|
|
2693
|
+
* type: "turnover",
|
|
2694
|
+
* priority: "rush",
|
|
2695
|
+
* });
|
|
2696
|
+
* ```
|
|
2697
|
+
*/
|
|
2698
|
+
declare class HousekeepingService extends BaseService {
|
|
2699
|
+
protected readonly basePath = "/operations/v1/housekeeping";
|
|
2700
|
+
/** Get the housekeeping board with optional filters */
|
|
2701
|
+
getBoard(params?: GetBoardParams): Promise<HousekeepingBoard>;
|
|
2702
|
+
/** Update the housekeeping status of a space */
|
|
2703
|
+
updateSpaceStatus(spaceId: string, input: UpdateSpaceStatusInput): Promise<HousekeepingBoardEntry>;
|
|
2704
|
+
/** Create a housekeeping task */
|
|
2705
|
+
createTask(input: CreateHousekeepingTaskInput): Promise<HousekeepingTask>;
|
|
2706
|
+
/** List housekeeping tasks with optional filters */
|
|
2707
|
+
listTasks(params?: ListHousekeepingTasksParams): Promise<PaginatedHousekeepingTasks>;
|
|
2708
|
+
/** Update a housekeeping task */
|
|
2709
|
+
updateTask(taskId: string, input: UpdateHousekeepingTaskInput): Promise<HousekeepingTask>;
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
/**
|
|
2713
|
+
* Service for night audit operations in the Atzentis Booking API.
|
|
2714
|
+
*
|
|
2715
|
+
* Supports running night audits (with optional dry-run mode),
|
|
2716
|
+
* retrieving audit history, and generating detailed reports with
|
|
2717
|
+
* revenue, occupancy, payment, and discrepancy breakdowns.
|
|
2718
|
+
*
|
|
2719
|
+
* @example
|
|
2720
|
+
* ```typescript
|
|
2721
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2722
|
+
*
|
|
2723
|
+
* // Run a night audit
|
|
2724
|
+
* const audit = await booking.nightAudit.run({
|
|
2725
|
+
* propertyId: "prop_abc123",
|
|
2726
|
+
* });
|
|
2727
|
+
*
|
|
2728
|
+
* // Dry-run to preview without committing
|
|
2729
|
+
* const preview = await booking.nightAudit.run({
|
|
2730
|
+
* propertyId: "prop_abc123",
|
|
2731
|
+
* dryRun: true,
|
|
2732
|
+
* });
|
|
2733
|
+
*
|
|
2734
|
+
* // Get the detailed report
|
|
2735
|
+
* const report = await booking.nightAudit.getReport(audit.id);
|
|
2736
|
+
* ```
|
|
2737
|
+
*/
|
|
2738
|
+
declare class NightAuditService extends BaseService {
|
|
2739
|
+
protected readonly basePath = "/operations/v1/night-audit";
|
|
2740
|
+
/** Run a night audit for a property */
|
|
2741
|
+
run(input: RunNightAuditInput): Promise<NightAuditRun>;
|
|
2742
|
+
/** Get night audit history with optional filters */
|
|
2743
|
+
getHistory(params?: GetNightAuditHistoryParams): Promise<PaginatedNightAuditRuns>;
|
|
2744
|
+
/** Get the detailed report for a completed night audit */
|
|
2745
|
+
getReport(auditId: string): Promise<NightAuditReport>;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
/** Supported payment providers */
|
|
2749
|
+
type PaymentProvider = "stripe" | "viva_wallet";
|
|
2750
|
+
/** Status of a payment */
|
|
2751
|
+
type PaymentStatus = "succeeded" | "pending" | "failed" | "requires_action";
|
|
2752
|
+
/** A processed payment */
|
|
2753
|
+
interface Payment {
|
|
2754
|
+
id: string;
|
|
2755
|
+
bookingId: string;
|
|
2756
|
+
amount: number;
|
|
2757
|
+
currency: string;
|
|
2758
|
+
status: PaymentStatus;
|
|
2759
|
+
provider: PaymentProvider;
|
|
2760
|
+
providerTransactionId: string | null;
|
|
2761
|
+
paymentMethodId: string | null;
|
|
2762
|
+
description: string | null;
|
|
2763
|
+
metadata: Record<string, unknown> | null;
|
|
2764
|
+
createdAt: string;
|
|
2765
|
+
updatedAt: string;
|
|
2766
|
+
}
|
|
2767
|
+
/** Input for processing a payment */
|
|
2768
|
+
interface ProcessPaymentInput {
|
|
2769
|
+
bookingId: string;
|
|
2770
|
+
amount: number;
|
|
2771
|
+
currency: string;
|
|
2772
|
+
paymentMethodId?: string;
|
|
2773
|
+
description?: string;
|
|
2774
|
+
metadata?: Record<string, unknown>;
|
|
2775
|
+
}
|
|
2776
|
+
/** Status of a refund */
|
|
2777
|
+
type RefundStatus = "succeeded" | "pending" | "failed";
|
|
2778
|
+
/** A refund applied to a payment */
|
|
2779
|
+
interface Refund {
|
|
2780
|
+
id: string;
|
|
2781
|
+
paymentId: string;
|
|
2782
|
+
amount: number;
|
|
2783
|
+
status: RefundStatus;
|
|
2784
|
+
reason: string | null;
|
|
2785
|
+
createdAt: string;
|
|
2786
|
+
}
|
|
2787
|
+
/** Input for refunding a payment */
|
|
2788
|
+
interface RefundInput {
|
|
2789
|
+
amount?: number;
|
|
2790
|
+
reason?: string;
|
|
2791
|
+
}
|
|
2792
|
+
/** Type of transaction */
|
|
2793
|
+
type TransactionType = "payment" | "refund" | "authorization" | "capture";
|
|
2794
|
+
/** A financial transaction record */
|
|
2795
|
+
interface Transaction {
|
|
2796
|
+
id: string;
|
|
2797
|
+
type: TransactionType;
|
|
2798
|
+
bookingId: string | null;
|
|
2799
|
+
amount: number;
|
|
2800
|
+
currency: string;
|
|
2801
|
+
status: string;
|
|
2802
|
+
provider: PaymentProvider;
|
|
2803
|
+
providerTransactionId: string | null;
|
|
2804
|
+
metadata: Record<string, unknown> | null;
|
|
2805
|
+
createdAt: string;
|
|
2806
|
+
}
|
|
2807
|
+
/** Parameters for listing transactions */
|
|
2808
|
+
interface ListTransactionsParams {
|
|
2809
|
+
bookingId?: string;
|
|
2810
|
+
status?: string;
|
|
2811
|
+
provider?: PaymentProvider;
|
|
2812
|
+
type?: TransactionType;
|
|
2813
|
+
from?: string;
|
|
2814
|
+
to?: string;
|
|
2815
|
+
limit?: number;
|
|
2816
|
+
cursor?: string;
|
|
2817
|
+
}
|
|
2818
|
+
/** Paginated list of transactions */
|
|
2819
|
+
type PaginatedTransactions = Paginated<Transaction>;
|
|
2820
|
+
/** Card details for a stored payment method */
|
|
2821
|
+
interface CardDetails {
|
|
2822
|
+
last4: string;
|
|
2823
|
+
brand: string;
|
|
2824
|
+
expMonth: number;
|
|
2825
|
+
expYear: number;
|
|
2826
|
+
}
|
|
2827
|
+
/** Status of a payment account (stored card) */
|
|
2828
|
+
type PaymentAccountStatus = "active" | "expired" | "revoked";
|
|
2829
|
+
/** A stored payment method (card on file) */
|
|
2830
|
+
interface PaymentAccount {
|
|
2831
|
+
id: string;
|
|
2832
|
+
paymentMethodId: string;
|
|
2833
|
+
bookingId: string | null;
|
|
2834
|
+
guestId: string | null;
|
|
2835
|
+
card: CardDetails;
|
|
2836
|
+
label: string | null;
|
|
2837
|
+
status: PaymentAccountStatus;
|
|
2838
|
+
metadata: Record<string, unknown> | null;
|
|
2839
|
+
createdAt: string;
|
|
2840
|
+
}
|
|
2841
|
+
/** Input for creating a payment account */
|
|
2842
|
+
interface CreatePaymentAccountInput {
|
|
2843
|
+
paymentMethodId: string;
|
|
2844
|
+
bookingId?: string;
|
|
2845
|
+
guestId?: string;
|
|
2846
|
+
label?: string;
|
|
2847
|
+
metadata?: Record<string, unknown>;
|
|
2848
|
+
}
|
|
2849
|
+
/** Parameters for listing payment accounts */
|
|
2850
|
+
interface ListPaymentAccountsParams {
|
|
2851
|
+
bookingId?: string;
|
|
2852
|
+
guestId?: string;
|
|
2853
|
+
status?: PaymentAccountStatus;
|
|
2854
|
+
limit?: number;
|
|
2855
|
+
cursor?: string;
|
|
2856
|
+
}
|
|
2857
|
+
/** Paginated list of payment accounts */
|
|
2858
|
+
type PaginatedPaymentAccounts = Paginated<PaymentAccount>;
|
|
2859
|
+
/** Status of a pre-authorization */
|
|
2860
|
+
type AuthorizationStatus = "authorized" | "expired" | "captured" | "voided";
|
|
2861
|
+
/** A pre-authorization hold on a stored card */
|
|
2862
|
+
interface Authorization {
|
|
2863
|
+
id: string;
|
|
2864
|
+
accountId: string;
|
|
2865
|
+
amount: number;
|
|
2866
|
+
currency: string;
|
|
2867
|
+
status: AuthorizationStatus;
|
|
2868
|
+
expiresAt: string;
|
|
2869
|
+
description: string | null;
|
|
2870
|
+
metadata: Record<string, unknown> | null;
|
|
2871
|
+
createdAt: string;
|
|
2872
|
+
}
|
|
2873
|
+
/** Input for authorizing a hold */
|
|
2874
|
+
interface AuthorizeInput {
|
|
2875
|
+
amount: number;
|
|
2876
|
+
currency?: string;
|
|
2877
|
+
description?: string;
|
|
2878
|
+
metadata?: Record<string, unknown>;
|
|
2879
|
+
}
|
|
2880
|
+
/** Input for capturing an authorized hold */
|
|
2881
|
+
interface CaptureInput {
|
|
2882
|
+
amount: number;
|
|
2883
|
+
description?: string;
|
|
2884
|
+
metadata?: Record<string, unknown>;
|
|
2885
|
+
}
|
|
2886
|
+
/** Status of a terminal POS transaction */
|
|
2887
|
+
type TerminalTransactionStatus = "pending" | "authorized" | "declined" | "timeout";
|
|
2888
|
+
/** A POS terminal transaction */
|
|
2889
|
+
interface TerminalTransaction {
|
|
2890
|
+
id: string;
|
|
2891
|
+
terminalId: string;
|
|
2892
|
+
amount: number;
|
|
2893
|
+
currency: string;
|
|
2894
|
+
status: TerminalTransactionStatus;
|
|
2895
|
+
cardPresent: boolean;
|
|
2896
|
+
bookingId: string | null;
|
|
2897
|
+
description: string | null;
|
|
2898
|
+
metadata: Record<string, unknown> | null;
|
|
2899
|
+
createdAt: string;
|
|
2900
|
+
}
|
|
2901
|
+
/** Input for terminal authorization */
|
|
2902
|
+
interface TerminalAuthorizeInput {
|
|
2903
|
+
amount: number;
|
|
2904
|
+
terminalId: string;
|
|
2905
|
+
bookingId?: string;
|
|
2906
|
+
description?: string;
|
|
2907
|
+
currency?: string;
|
|
2908
|
+
metadata?: Record<string, unknown>;
|
|
2909
|
+
}
|
|
2910
|
+
/** Status of an IRIS bank transfer */
|
|
2911
|
+
type IrisTransferStatus = "initiated" | "completed" | "failed" | "expired";
|
|
2912
|
+
/** An IRIS instant bank transfer */
|
|
2913
|
+
interface IrisTransfer {
|
|
2914
|
+
id: string;
|
|
2915
|
+
amount: number;
|
|
2916
|
+
currency: string;
|
|
2917
|
+
guestId: string;
|
|
2918
|
+
bookingId: string | null;
|
|
2919
|
+
status: IrisTransferStatus;
|
|
2920
|
+
paymentUrl: string;
|
|
2921
|
+
expiresAt: string;
|
|
2922
|
+
description: string | null;
|
|
2923
|
+
metadata: Record<string, unknown> | null;
|
|
2924
|
+
createdAt: string;
|
|
2925
|
+
completedAt: string | null;
|
|
2926
|
+
}
|
|
2927
|
+
/** Input for initiating an IRIS transfer */
|
|
2928
|
+
interface IrisInitiateInput {
|
|
2929
|
+
amount: number;
|
|
2930
|
+
guestId: string;
|
|
2931
|
+
bookingId?: string;
|
|
2932
|
+
description?: string;
|
|
2933
|
+
returnUrl?: string;
|
|
2934
|
+
metadata?: Record<string, unknown>;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
/**
|
|
2938
|
+
* Service for payment operations in the Atzentis Booking API.
|
|
2939
|
+
*
|
|
2940
|
+
* Supports Stripe and Viva Wallet providers with payment processing,
|
|
2941
|
+
* refunds, stored card management (authorize/capture), POS terminal
|
|
2942
|
+
* operations, and IRIS Greek bank transfers.
|
|
2943
|
+
*
|
|
2944
|
+
* @example
|
|
2945
|
+
* ```typescript
|
|
2946
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2947
|
+
*
|
|
2948
|
+
* // Process a payment
|
|
2949
|
+
* const payment = await booking.payments.process({
|
|
2950
|
+
* bookingId: "bk_abc123",
|
|
2951
|
+
* amount: 15000,
|
|
2952
|
+
* currency: "EUR",
|
|
2953
|
+
* });
|
|
2954
|
+
*
|
|
2955
|
+
* // Partial refund
|
|
2956
|
+
* const refund = await booking.payments.refund(payment.id, {
|
|
2957
|
+
* amount: 5000,
|
|
2958
|
+
* reason: "Early checkout",
|
|
2959
|
+
* });
|
|
2960
|
+
* ```
|
|
2961
|
+
*/
|
|
2962
|
+
declare class PaymentsService extends BaseService {
|
|
2963
|
+
protected readonly basePath = "/payment/v1";
|
|
2964
|
+
/** Process a payment for a booking */
|
|
2965
|
+
process(input: ProcessPaymentInput): Promise<Payment>;
|
|
2966
|
+
/** Refund a payment (full or partial) */
|
|
2967
|
+
refund(paymentId: string, input?: RefundInput): Promise<Refund>;
|
|
2968
|
+
/** Get a transaction by ID */
|
|
2969
|
+
getTransaction(transactionId: string): Promise<Transaction>;
|
|
2970
|
+
/** List transactions with optional filters */
|
|
2971
|
+
listTransactions(params?: ListTransactionsParams): Promise<PaginatedTransactions>;
|
|
2972
|
+
/** Create a payment account (store a card on file) */
|
|
2973
|
+
createAccount(input: CreatePaymentAccountInput): Promise<PaymentAccount>;
|
|
2974
|
+
/** Get a payment account by ID */
|
|
2975
|
+
getAccount(accountId: string): Promise<PaymentAccount>;
|
|
2976
|
+
/** List payment accounts with optional filters */
|
|
2977
|
+
listAccounts(params?: ListPaymentAccountsParams): Promise<PaginatedPaymentAccounts>;
|
|
2978
|
+
/** Delete a payment account */
|
|
2979
|
+
deleteAccount(accountId: string): Promise<void>;
|
|
2980
|
+
/** Authorize a hold on a stored card */
|
|
2981
|
+
authorize(accountId: string, input: AuthorizeInput): Promise<Authorization>;
|
|
2982
|
+
/** Capture a previously authorized hold */
|
|
2983
|
+
capture(accountId: string, input: CaptureInput): Promise<Payment>;
|
|
2984
|
+
/** Initiate a POS terminal payment authorization */
|
|
2985
|
+
terminalAuthorize(input: TerminalAuthorizeInput): Promise<TerminalTransaction>;
|
|
2986
|
+
/** Initiate an IRIS instant bank transfer */
|
|
2987
|
+
irisInitiate(input: IrisInitiateInput): Promise<IrisTransfer>;
|
|
2988
|
+
/** Get the status of an IRIS transfer */
|
|
2989
|
+
irisStatus(transferId: string): Promise<IrisTransfer>;
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
/**
|
|
2993
|
+
* Service for managing properties in the Atzentis Booking API.
|
|
2994
|
+
*
|
|
2995
|
+
* @example
|
|
2996
|
+
* ```typescript
|
|
2997
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2998
|
+
*
|
|
2999
|
+
* // List all active properties
|
|
3000
|
+
* const { data, hasMore } = await booking.properties.list({ status: "active" });
|
|
3001
|
+
*
|
|
3002
|
+
* // Create a new property
|
|
3003
|
+
* const property = await booking.properties.create({
|
|
3004
|
+
* name: "Seaside Villa",
|
|
3005
|
+
* type: "villa",
|
|
3006
|
+
* currency: "EUR",
|
|
3007
|
+
* timezone: "Europe/Athens",
|
|
3008
|
+
* address: { street: "123 Coast Rd", city: "Chania", country: "GR" },
|
|
3009
|
+
* });
|
|
3010
|
+
* ```
|
|
3011
|
+
*/
|
|
3012
|
+
declare class PropertiesService extends BaseService {
|
|
3013
|
+
protected readonly basePath = "/inventory/v1/properties";
|
|
3014
|
+
/**
|
|
3015
|
+
* Create a new property.
|
|
3016
|
+
*
|
|
3017
|
+
* @example
|
|
3018
|
+
* ```typescript
|
|
3019
|
+
* const property = await booking.properties.create({
|
|
3020
|
+
* name: "Hotel Athena",
|
|
3021
|
+
* type: "hotel",
|
|
3022
|
+
* currency: "EUR",
|
|
3023
|
+
* timezone: "Europe/Athens",
|
|
3024
|
+
* address: { street: "1 Plaka St", city: "Athens", country: "GR" },
|
|
3025
|
+
* });
|
|
3026
|
+
* ```
|
|
3027
|
+
*/
|
|
3028
|
+
create(input: CreatePropertyInput): Promise<Property>;
|
|
3029
|
+
/**
|
|
3030
|
+
* List properties with optional filters and cursor-based pagination.
|
|
1814
3031
|
*
|
|
1815
3032
|
* @example
|
|
1816
3033
|
* ```typescript
|
|
@@ -1851,6 +3068,273 @@ declare class PropertiesService extends BaseService {
|
|
|
1851
3068
|
delete(propertyId: string): Promise<void>;
|
|
1852
3069
|
}
|
|
1853
3070
|
|
|
3071
|
+
/** Status of a rate plan */
|
|
3072
|
+
type RatePlanStatus = "active" | "inactive";
|
|
3073
|
+
/** A rate plan entity */
|
|
3074
|
+
interface RatePlan {
|
|
3075
|
+
id: string;
|
|
3076
|
+
propertyId: string;
|
|
3077
|
+
categoryId: string;
|
|
3078
|
+
name: string;
|
|
3079
|
+
description: string | null;
|
|
3080
|
+
status: RatePlanStatus;
|
|
3081
|
+
baseRate: number;
|
|
3082
|
+
currency: string;
|
|
3083
|
+
taxInclusive: boolean;
|
|
3084
|
+
metadata: Record<string, unknown> | null;
|
|
3085
|
+
createdAt: string;
|
|
3086
|
+
updatedAt: string;
|
|
3087
|
+
}
|
|
3088
|
+
/** Input for creating a rate plan */
|
|
3089
|
+
interface CreateRatePlanInput {
|
|
3090
|
+
propertyId: string;
|
|
3091
|
+
categoryId: string;
|
|
3092
|
+
name: string;
|
|
3093
|
+
baseRate: number;
|
|
3094
|
+
description?: string;
|
|
3095
|
+
currency?: string;
|
|
3096
|
+
taxInclusive?: boolean;
|
|
3097
|
+
metadata?: Record<string, unknown>;
|
|
3098
|
+
}
|
|
3099
|
+
/** Input for updating a rate plan */
|
|
3100
|
+
interface UpdateRatePlanInput {
|
|
3101
|
+
name?: string;
|
|
3102
|
+
description?: string;
|
|
3103
|
+
baseRate?: number;
|
|
3104
|
+
status?: RatePlanStatus;
|
|
3105
|
+
currency?: string;
|
|
3106
|
+
taxInclusive?: boolean;
|
|
3107
|
+
metadata?: Record<string, unknown>;
|
|
3108
|
+
}
|
|
3109
|
+
/** Parameters for listing rate plans */
|
|
3110
|
+
interface ListRatePlansParams {
|
|
3111
|
+
propertyId?: string;
|
|
3112
|
+
categoryId?: string;
|
|
3113
|
+
status?: RatePlanStatus;
|
|
3114
|
+
limit?: number;
|
|
3115
|
+
cursor?: string;
|
|
3116
|
+
}
|
|
3117
|
+
/** Paginated list of rate plans */
|
|
3118
|
+
type PaginatedRatePlans = Paginated<RatePlan>;
|
|
3119
|
+
/** A rate period with seasonal pricing */
|
|
3120
|
+
interface RatePeriod {
|
|
3121
|
+
id: string;
|
|
3122
|
+
planId: string;
|
|
3123
|
+
name: string;
|
|
3124
|
+
startDate: string;
|
|
3125
|
+
endDate: string;
|
|
3126
|
+
rate: number;
|
|
3127
|
+
adjustmentPercent: number | null;
|
|
3128
|
+
adjustmentAmount: number | null;
|
|
3129
|
+
minStay: number | null;
|
|
3130
|
+
metadata: Record<string, unknown> | null;
|
|
3131
|
+
createdAt: string;
|
|
3132
|
+
updatedAt: string;
|
|
3133
|
+
}
|
|
3134
|
+
/** Input for creating a rate period */
|
|
3135
|
+
interface CreateRatePeriodInput {
|
|
3136
|
+
name: string;
|
|
3137
|
+
startDate: string;
|
|
3138
|
+
endDate: string;
|
|
3139
|
+
rate: number;
|
|
3140
|
+
adjustmentPercent?: number;
|
|
3141
|
+
adjustmentAmount?: number;
|
|
3142
|
+
minStay?: number;
|
|
3143
|
+
metadata?: Record<string, unknown>;
|
|
3144
|
+
}
|
|
3145
|
+
/** Input for updating a rate period */
|
|
3146
|
+
interface UpdateRatePeriodInput {
|
|
3147
|
+
name?: string;
|
|
3148
|
+
startDate?: string;
|
|
3149
|
+
endDate?: string;
|
|
3150
|
+
rate?: number;
|
|
3151
|
+
adjustmentPercent?: number | null;
|
|
3152
|
+
adjustmentAmount?: number | null;
|
|
3153
|
+
minStay?: number | null;
|
|
3154
|
+
metadata?: Record<string, unknown>;
|
|
3155
|
+
}
|
|
3156
|
+
/** Parameters for listing rate periods */
|
|
3157
|
+
interface ListRatePeriodsParams {
|
|
3158
|
+
fromDate?: string;
|
|
3159
|
+
toDate?: string;
|
|
3160
|
+
limit?: number;
|
|
3161
|
+
cursor?: string;
|
|
3162
|
+
}
|
|
3163
|
+
/** Paginated list of rate periods */
|
|
3164
|
+
type PaginatedRatePeriods = Paginated<RatePeriod>;
|
|
3165
|
+
/** Booking restrictions on a rate plan */
|
|
3166
|
+
interface RateRestriction {
|
|
3167
|
+
planId: string;
|
|
3168
|
+
minStay: number | null;
|
|
3169
|
+
maxStay: number | null;
|
|
3170
|
+
closedToArrival: boolean;
|
|
3171
|
+
closedToDeparture: boolean;
|
|
3172
|
+
closeOutDates: string[];
|
|
3173
|
+
advanceBookingMin: number | null;
|
|
3174
|
+
advanceBookingMax: number | null;
|
|
3175
|
+
updatedAt: string;
|
|
3176
|
+
}
|
|
3177
|
+
/** Input for updating rate restrictions */
|
|
3178
|
+
interface UpdateRateRestrictionInput {
|
|
3179
|
+
minStay?: number | null;
|
|
3180
|
+
maxStay?: number | null;
|
|
3181
|
+
closedToArrival?: boolean;
|
|
3182
|
+
closedToDeparture?: boolean;
|
|
3183
|
+
closeOutDates?: string[];
|
|
3184
|
+
advanceBookingMin?: number | null;
|
|
3185
|
+
advanceBookingMax?: number | null;
|
|
3186
|
+
}
|
|
3187
|
+
/** Input for calculating a rate */
|
|
3188
|
+
interface CalculateRateInput {
|
|
3189
|
+
propertyId: string;
|
|
3190
|
+
categoryId: string;
|
|
3191
|
+
checkIn: string;
|
|
3192
|
+
checkOut: string;
|
|
3193
|
+
planId?: string;
|
|
3194
|
+
guests?: number;
|
|
3195
|
+
promoCode?: string;
|
|
3196
|
+
}
|
|
3197
|
+
/** A modifier applied to a nightly rate */
|
|
3198
|
+
interface RateModifier {
|
|
3199
|
+
name: string;
|
|
3200
|
+
type: "percent" | "fixed";
|
|
3201
|
+
value: number;
|
|
3202
|
+
}
|
|
3203
|
+
/** Nightly rate breakdown */
|
|
3204
|
+
interface NightlyRate {
|
|
3205
|
+
date: string;
|
|
3206
|
+
baseRate: number;
|
|
3207
|
+
finalRate: number;
|
|
3208
|
+
modifiers: RateModifier[];
|
|
3209
|
+
}
|
|
3210
|
+
/** An applied restriction with its status */
|
|
3211
|
+
interface AppliedRestriction {
|
|
3212
|
+
type: string;
|
|
3213
|
+
value: string | number | boolean;
|
|
3214
|
+
passed: boolean;
|
|
3215
|
+
message: string | null;
|
|
3216
|
+
}
|
|
3217
|
+
/** Result of a rate calculation */
|
|
3218
|
+
interface RateCalculation {
|
|
3219
|
+
planId: string;
|
|
3220
|
+
planName: string;
|
|
3221
|
+
totalAmount: number;
|
|
3222
|
+
currency: string;
|
|
3223
|
+
nights: number;
|
|
3224
|
+
averageNightlyRate: number;
|
|
3225
|
+
nightlyBreakdown: NightlyRate[];
|
|
3226
|
+
restrictions: AppliedRestriction[];
|
|
3227
|
+
taxAmount: number | null;
|
|
3228
|
+
taxInclusive: boolean;
|
|
3229
|
+
}
|
|
3230
|
+
/** Input for pushing rates to a portfolio */
|
|
3231
|
+
interface PushPortfolioRatesInput {
|
|
3232
|
+
sourcePlanId: string;
|
|
3233
|
+
targetPropertyIds: string[];
|
|
3234
|
+
adjustmentPercent?: number;
|
|
3235
|
+
adjustmentAmount?: number;
|
|
3236
|
+
periodIds?: string[];
|
|
3237
|
+
}
|
|
3238
|
+
/** Result for a single portfolio target property */
|
|
3239
|
+
interface PortfolioTargetResult {
|
|
3240
|
+
propertyId: string;
|
|
3241
|
+
success: boolean;
|
|
3242
|
+
planId: string | null;
|
|
3243
|
+
error: string | null;
|
|
3244
|
+
}
|
|
3245
|
+
/** Result of a portfolio rate push operation */
|
|
3246
|
+
interface PortfolioRatePushResult {
|
|
3247
|
+
sourcePlanId: string;
|
|
3248
|
+
results: PortfolioTargetResult[];
|
|
3249
|
+
totalPushed: number;
|
|
3250
|
+
totalFailed: number;
|
|
3251
|
+
}
|
|
3252
|
+
/** Input for comparing portfolio rates */
|
|
3253
|
+
interface ComparePortfolioRatesInput {
|
|
3254
|
+
portfolioId: string;
|
|
3255
|
+
categoryId: string;
|
|
3256
|
+
checkIn: string;
|
|
3257
|
+
checkOut: string;
|
|
3258
|
+
}
|
|
3259
|
+
/** Rate data for a single property in a portfolio comparison */
|
|
3260
|
+
interface PortfolioPropertyRate {
|
|
3261
|
+
propertyId: string;
|
|
3262
|
+
propertyName: string;
|
|
3263
|
+
planId: string;
|
|
3264
|
+
planName: string;
|
|
3265
|
+
totalAmount: number;
|
|
3266
|
+
averageNightlyRate: number;
|
|
3267
|
+
currency: string;
|
|
3268
|
+
}
|
|
3269
|
+
/** Result of a portfolio rate comparison */
|
|
3270
|
+
interface PortfolioRateComparison {
|
|
3271
|
+
portfolioId: string;
|
|
3272
|
+
categoryId: string;
|
|
3273
|
+
checkIn: string;
|
|
3274
|
+
checkOut: string;
|
|
3275
|
+
properties: PortfolioPropertyRate[];
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Service for rate plan management in the Atzentis Booking API.
|
|
3280
|
+
*
|
|
3281
|
+
* Provides rate plan CRUD, rate period management with seasonal pricing,
|
|
3282
|
+
* restriction configuration, dynamic price calculation with nightly breakdown,
|
|
3283
|
+
* and portfolio-wide rate push and comparison.
|
|
3284
|
+
*
|
|
3285
|
+
* @example
|
|
3286
|
+
* ```typescript
|
|
3287
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
3288
|
+
*
|
|
3289
|
+
* // Create a rate plan
|
|
3290
|
+
* const plan = await booking.ratePlans.create({
|
|
3291
|
+
* propertyId: "prop_abc123",
|
|
3292
|
+
* categoryId: "cat_std",
|
|
3293
|
+
* name: "Standard Rate",
|
|
3294
|
+
* baseRate: 15000,
|
|
3295
|
+
* });
|
|
3296
|
+
*
|
|
3297
|
+
* // Calculate price for a stay
|
|
3298
|
+
* const price = await booking.ratePlans.calculate({
|
|
3299
|
+
* propertyId: "prop_abc123",
|
|
3300
|
+
* categoryId: "cat_std",
|
|
3301
|
+
* checkIn: "2025-07-01",
|
|
3302
|
+
* checkOut: "2025-07-05",
|
|
3303
|
+
* });
|
|
3304
|
+
* ```
|
|
3305
|
+
*/
|
|
3306
|
+
declare class RatePlansService extends BaseService {
|
|
3307
|
+
protected readonly basePath = "/rate/v1";
|
|
3308
|
+
/** List rate plans with optional filters */
|
|
3309
|
+
list(params?: ListRatePlansParams): Promise<PaginatedRatePlans>;
|
|
3310
|
+
/** Get a rate plan by ID */
|
|
3311
|
+
get(planId: string): Promise<RatePlan>;
|
|
3312
|
+
/** Create a new rate plan */
|
|
3313
|
+
create(input: CreateRatePlanInput): Promise<RatePlan>;
|
|
3314
|
+
/** Update a rate plan */
|
|
3315
|
+
update(planId: string, input: UpdateRatePlanInput): Promise<RatePlan>;
|
|
3316
|
+
/** Delete a rate plan */
|
|
3317
|
+
delete(planId: string): Promise<void>;
|
|
3318
|
+
/** List rate periods for a plan */
|
|
3319
|
+
listPeriods(planId: string, params?: ListRatePeriodsParams): Promise<PaginatedRatePeriods>;
|
|
3320
|
+
/** Get a rate period by ID */
|
|
3321
|
+
getPeriod(planId: string, periodId: string): Promise<RatePeriod>;
|
|
3322
|
+
/** Create a rate period */
|
|
3323
|
+
createPeriod(planId: string, input: CreateRatePeriodInput): Promise<RatePeriod>;
|
|
3324
|
+
/** Update a rate period */
|
|
3325
|
+
updatePeriod(planId: string, periodId: string, input: UpdateRatePeriodInput): Promise<RatePeriod>;
|
|
3326
|
+
/** Get restrictions for a rate plan */
|
|
3327
|
+
getRestrictions(planId: string): Promise<RateRestriction>;
|
|
3328
|
+
/** Update restrictions for a rate plan */
|
|
3329
|
+
updateRestrictions(planId: string, input: UpdateRateRestrictionInput): Promise<RateRestriction>;
|
|
3330
|
+
/** Calculate price for a stay */
|
|
3331
|
+
calculate(input: CalculateRateInput): Promise<RateCalculation>;
|
|
3332
|
+
/** Push rates to portfolio properties */
|
|
3333
|
+
pushToPortfolio(input: PushPortfolioRatesInput): Promise<PortfolioRatePushResult>;
|
|
3334
|
+
/** Compare rates across portfolio properties */
|
|
3335
|
+
comparePortfolioRates(input: ComparePortfolioRatesInput): Promise<PortfolioRateComparison>;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
1854
3338
|
/**
|
|
1855
3339
|
* Service for managing bookable spaces in the Atzentis Booking API.
|
|
1856
3340
|
*
|
|
@@ -1980,6 +3464,154 @@ declare class SpacesService extends BaseService {
|
|
|
1980
3464
|
linkPosTable(spaceId: string, input: LinkPosTableInput): Promise<Space>;
|
|
1981
3465
|
}
|
|
1982
3466
|
|
|
3467
|
+
/** Department a staff member belongs to */
|
|
3468
|
+
type StaffDepartment = "front_desk" | "housekeeping" | "maintenance" | "food_beverage" | "management" | "spa" | "security" | "other";
|
|
3469
|
+
/** Role of a staff member */
|
|
3470
|
+
type StaffRole = "manager" | "supervisor" | "staff" | "intern" | "contractor";
|
|
3471
|
+
/** Employment status of a staff member */
|
|
3472
|
+
type StaffStatus = "active" | "inactive" | "on_leave";
|
|
3473
|
+
/** Type of shift */
|
|
3474
|
+
type ShiftType = "morning" | "afternoon" | "evening" | "night" | "custom";
|
|
3475
|
+
/** A staff member entity */
|
|
3476
|
+
interface Staff {
|
|
3477
|
+
id: string;
|
|
3478
|
+
propertyId: string;
|
|
3479
|
+
firstName: string;
|
|
3480
|
+
lastName: string;
|
|
3481
|
+
email: string | null;
|
|
3482
|
+
phone: string | null;
|
|
3483
|
+
department: StaffDepartment;
|
|
3484
|
+
role: StaffRole;
|
|
3485
|
+
status: StaffStatus;
|
|
3486
|
+
hireDate: string | null;
|
|
3487
|
+
notes: string | null;
|
|
3488
|
+
metadata: Record<string, unknown> | null;
|
|
3489
|
+
createdAt: string;
|
|
3490
|
+
updatedAt: string;
|
|
3491
|
+
}
|
|
3492
|
+
/** A staff shift record */
|
|
3493
|
+
interface StaffShift {
|
|
3494
|
+
id: string;
|
|
3495
|
+
staffId: string;
|
|
3496
|
+
propertyId: string;
|
|
3497
|
+
shiftType: ShiftType;
|
|
3498
|
+
startTime: string | null;
|
|
3499
|
+
endTime: string | null;
|
|
3500
|
+
date: string;
|
|
3501
|
+
notes: string | null;
|
|
3502
|
+
metadata: Record<string, unknown> | null;
|
|
3503
|
+
createdAt: string;
|
|
3504
|
+
updatedAt: string;
|
|
3505
|
+
}
|
|
3506
|
+
/** Input for creating a staff member */
|
|
3507
|
+
interface CreateStaffInput {
|
|
3508
|
+
propertyId: string;
|
|
3509
|
+
firstName: string;
|
|
3510
|
+
lastName: string;
|
|
3511
|
+
email?: string;
|
|
3512
|
+
phone?: string;
|
|
3513
|
+
department?: StaffDepartment;
|
|
3514
|
+
role?: StaffRole;
|
|
3515
|
+
status?: StaffStatus;
|
|
3516
|
+
hireDate?: string;
|
|
3517
|
+
notes?: string;
|
|
3518
|
+
metadata?: Record<string, unknown>;
|
|
3519
|
+
}
|
|
3520
|
+
/** Input for updating a staff member */
|
|
3521
|
+
interface UpdateStaffInput {
|
|
3522
|
+
firstName?: string;
|
|
3523
|
+
lastName?: string;
|
|
3524
|
+
email?: string;
|
|
3525
|
+
phone?: string;
|
|
3526
|
+
department?: StaffDepartment;
|
|
3527
|
+
role?: StaffRole;
|
|
3528
|
+
status?: StaffStatus;
|
|
3529
|
+
hireDate?: string;
|
|
3530
|
+
notes?: string;
|
|
3531
|
+
metadata?: Record<string, unknown>;
|
|
3532
|
+
}
|
|
3533
|
+
/** Parameters for listing staff members */
|
|
3534
|
+
interface ListStaffParams {
|
|
3535
|
+
propertyId: string;
|
|
3536
|
+
department?: StaffDepartment | StaffDepartment[];
|
|
3537
|
+
role?: StaffRole | StaffRole[];
|
|
3538
|
+
status?: StaffStatus;
|
|
3539
|
+
search?: string;
|
|
3540
|
+
limit?: number;
|
|
3541
|
+
cursor?: string;
|
|
3542
|
+
}
|
|
3543
|
+
/** Paginated list of staff members */
|
|
3544
|
+
type PaginatedStaff = Paginated<Staff>;
|
|
3545
|
+
/** Input for creating a shift */
|
|
3546
|
+
interface CreateShiftInput {
|
|
3547
|
+
date: string;
|
|
3548
|
+
shiftType: ShiftType;
|
|
3549
|
+
startTime?: string;
|
|
3550
|
+
endTime?: string;
|
|
3551
|
+
notes?: string;
|
|
3552
|
+
metadata?: Record<string, unknown>;
|
|
3553
|
+
}
|
|
3554
|
+
/** Parameters for listing shifts */
|
|
3555
|
+
interface ListShiftsParams {
|
|
3556
|
+
startDate?: string;
|
|
3557
|
+
endDate?: string;
|
|
3558
|
+
shiftType?: ShiftType | ShiftType[];
|
|
3559
|
+
limit?: number;
|
|
3560
|
+
cursor?: string;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
/**
|
|
3564
|
+
* Service for staff management in the Atzentis Booking API.
|
|
3565
|
+
*
|
|
3566
|
+
* Provides staff CRUD with department and role filtering,
|
|
3567
|
+
* shift management with scheduling support, and multi-value
|
|
3568
|
+
* filter serialization for department and role arrays.
|
|
3569
|
+
*
|
|
3570
|
+
* @example
|
|
3571
|
+
* ```typescript
|
|
3572
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
3573
|
+
*
|
|
3574
|
+
* // Create a staff member
|
|
3575
|
+
* const member = await booking.staff.create({
|
|
3576
|
+
* propertyId: "prop_abc123",
|
|
3577
|
+
* firstName: "Maria",
|
|
3578
|
+
* lastName: "Papadopoulos",
|
|
3579
|
+
* department: "front_desk",
|
|
3580
|
+
* role: "supervisor",
|
|
3581
|
+
* });
|
|
3582
|
+
*
|
|
3583
|
+
* // List housekeeping and maintenance staff
|
|
3584
|
+
* const staff = await booking.staff.list({
|
|
3585
|
+
* propertyId: "prop_abc123",
|
|
3586
|
+
* department: ["housekeeping", "maintenance"],
|
|
3587
|
+
* status: "active",
|
|
3588
|
+
* });
|
|
3589
|
+
*
|
|
3590
|
+
* // Schedule a morning shift
|
|
3591
|
+
* await booking.staff.createShift(member.id, {
|
|
3592
|
+
* date: "2025-07-01",
|
|
3593
|
+
* shiftType: "morning",
|
|
3594
|
+
* });
|
|
3595
|
+
* ```
|
|
3596
|
+
*/
|
|
3597
|
+
declare class StaffService extends BaseService {
|
|
3598
|
+
protected readonly basePath = "/operations/v1/staff";
|
|
3599
|
+
/** Create a staff member */
|
|
3600
|
+
create(input: CreateStaffInput): Promise<Staff>;
|
|
3601
|
+
/** Get a staff member by ID */
|
|
3602
|
+
get(staffId: string): Promise<Staff>;
|
|
3603
|
+
/** List staff members with optional filters */
|
|
3604
|
+
list(params: ListStaffParams): Promise<PaginatedStaff>;
|
|
3605
|
+
/** Update a staff member */
|
|
3606
|
+
update(staffId: string, input: UpdateStaffInput): Promise<Staff>;
|
|
3607
|
+
/** Delete a staff member */
|
|
3608
|
+
delete(staffId: string): Promise<void>;
|
|
3609
|
+
/** Create a shift for a staff member */
|
|
3610
|
+
createShift(staffId: string, input: CreateShiftInput): Promise<StaffShift>;
|
|
3611
|
+
/** List shifts for a staff member */
|
|
3612
|
+
listShifts(staffId: string, params?: ListShiftsParams): Promise<StaffShift[]>;
|
|
3613
|
+
}
|
|
3614
|
+
|
|
1983
3615
|
/**
|
|
1984
3616
|
* Main SDK client for the Atzentis Booking API.
|
|
1985
3617
|
*
|
|
@@ -1993,23 +3625,47 @@ declare class BookingClient {
|
|
|
1993
3625
|
readonly httpClient: HttpClient;
|
|
1994
3626
|
private _availability?;
|
|
1995
3627
|
private _bookings?;
|
|
3628
|
+
private _distribution?;
|
|
3629
|
+
private _finance?;
|
|
3630
|
+
private _groups?;
|
|
1996
3631
|
private _guests?;
|
|
3632
|
+
private _housekeeping?;
|
|
3633
|
+
private _nightAudit?;
|
|
3634
|
+
private _payments?;
|
|
1997
3635
|
private _properties?;
|
|
3636
|
+
private _ratePlans?;
|
|
1998
3637
|
private _categories?;
|
|
1999
3638
|
private _spaces?;
|
|
3639
|
+
private _staff?;
|
|
2000
3640
|
constructor(config: BookingClientConfig);
|
|
2001
3641
|
/** Availability service — lazy-initialized on first access */
|
|
2002
3642
|
get availability(): AvailabilityService;
|
|
2003
3643
|
/** Bookings service — lazy-initialized on first access */
|
|
2004
3644
|
get bookings(): BookingsService;
|
|
3645
|
+
/** Distribution service — lazy-initialized on first access */
|
|
3646
|
+
get distribution(): DistributionService;
|
|
3647
|
+
/** Finance service — lazy-initialized on first access */
|
|
3648
|
+
get finance(): FinanceService;
|
|
3649
|
+
/** Groups service — lazy-initialized on first access */
|
|
3650
|
+
get groups(): GroupsService;
|
|
2005
3651
|
/** Guests service — lazy-initialized on first access */
|
|
2006
3652
|
get guests(): GuestsService;
|
|
3653
|
+
/** Housekeeping service — lazy-initialized on first access */
|
|
3654
|
+
get housekeeping(): HousekeepingService;
|
|
3655
|
+
/** Night audit service — lazy-initialized on first access */
|
|
3656
|
+
get nightAudit(): NightAuditService;
|
|
3657
|
+
/** Payments service — lazy-initialized on first access */
|
|
3658
|
+
get payments(): PaymentsService;
|
|
2007
3659
|
/** Properties service — lazy-initialized on first access */
|
|
2008
3660
|
get properties(): PropertiesService;
|
|
3661
|
+
/** Rate plans service — lazy-initialized on first access */
|
|
3662
|
+
get ratePlans(): RatePlansService;
|
|
2009
3663
|
/** Categories service — lazy-initialized on first access */
|
|
2010
3664
|
get categories(): CategoriesService;
|
|
2011
3665
|
/** Spaces service — lazy-initialized on first access */
|
|
2012
3666
|
get spaces(): SpacesService;
|
|
3667
|
+
/** Staff service — lazy-initialized on first access */
|
|
3668
|
+
get staff(): StaffService;
|
|
2013
3669
|
setApiKey(key: string): void;
|
|
2014
3670
|
setTenantId(id: string): void;
|
|
2015
3671
|
}
|
|
@@ -2092,4 +3748,4 @@ declare function firstPage<T>(fetcher: PageFetcher<T>, options?: PaginationOptio
|
|
|
2092
3748
|
|
|
2093
3749
|
declare const VERSION = "0.1.0";
|
|
2094
3750
|
|
|
2095
|
-
export { type AssignSpaceInput, AuthenticationError, type AvailabilityCheckParams, type AvailabilityPricing, type AvailabilityRestrictions, type AvailabilityResult, type AvailabilitySearchParams, type AvailabilitySearchResult, type AvailabilitySearchResultEntry, AvailabilityService, type AvailableSpace, BOOKING_STATUSES, BOOKING_TYPES, type Booking, BookingClient, type BookingClientConfig, BookingError, type BookingErrorOptions, type BookingGuest, type BookingPricing, type BookingSort, type BookingSpace, type BookingStatus, type BookingType, BookingsService, type BulkUpdateSpaceInput, type CalendarDay, type CalendarParams, type CancelBookingInput, CategoriesService, type CheckInInput, type CheckOutInput, ConflictError, type Coordinates, type CreateBookingInput, type CreateCategoryInput, type CreateGuestInput, type CreatePropertyInput, type CreateSpaceInput, DEFAULT_MODULES, type DuplicateCandidate, ForbiddenError, type Guest, type GuestAddress, type GuestBookingSummary, type GuestDuplicateResult, type GuestFolioSummary, type GuestHistoryParams, type GuestMatch, type GuestOrderSummary, type GuestPreferences, type GuestSearchResult, type GuestSort, GuestsService, HttpClient, type HttpClientOptions, type HttpMethod, type HttpResponse, type LinkPosTableInput, type ListBookingsParams, type ListCategoriesParams, type ListGuestsParams, type ListPropertiesParams, type ListSpacesParams, type Logger, type MergeGuestsInput, type NoShowInput, NotFoundError, PROPERTY_MODULES, type PageFetcher, type Paginated, type PaginatedBookings, type PaginatedGuestBookings, type PaginatedGuestFolios, type PaginatedGuestOrders, type PaginatedGuests, type PaginationOptions, PaymentError, type PriceRange, type PricingParams, type PricingResult, PropertiesService, type Property, type PropertyAddress, type PropertyModules, type PropertyStatus, type PropertyType, RateLimitError, type RequestOptions, type ResolvedBookingClientConfig, type RetryConfig, type RetryOptions, SPACE_STATUSES, SPACE_TYPES, type SearchGuestsParams, ServerError, type ServiceSlotParams, type ServiceTimeSlot, type Space, type SpaceCategory, type SpaceStatus, type SpaceType, SpacesService, type TableSlotParams, type TimeSlot, TimeoutError, type UpdateBookingInput, type UpdateCategoryInput, type UpdateGuestInput, type UpdateGuestPreferences, type UpdatePropertyInput, type UpdateSpaceInput, VERSION, ValidationError, bookingClientConfigSchema, createErrorFromResponse, firstPage, paginate };
|
|
3751
|
+
export { type AccountingDailyReport, type AccountingReportParams, type AccountingRevenueReport, type AccountingVatReport, type AppliedRestriction, type AssignSpaceInput, AuthenticationError, type Authorization, type AuthorizationStatus, type AuthorizeInput, type AvailabilityCheckParams, type AvailabilityPricing, type AvailabilityRestrictions, type AvailabilityResult, type AvailabilitySearchParams, type AvailabilitySearchResult, type AvailabilitySearchResultEntry, AvailabilityService, type AvailableSpace, BOOKING_STATUSES, BOOKING_TYPES, type Block, type BlockDate, type Booking, BookingClient, type BookingClientConfig, BookingError, type BookingErrorOptions, type BookingGuest, type BookingPricing, type BookingSort, type BookingSpace, type BookingStatus, type BookingType, BookingsService, type BulkUpdateSpaceInput, type CalculateRateInput, type CalendarDay, type CalendarParams, type CancelBookingInput, type CaptureInput, type CardDetails, CategoriesService, type CategoryPickup, type Channel, type ChannelCredentials, type ChannelMapping, type ChannelSettings, type ChannelStatus, type ChannelType, type ChargeType, type CheckInInput, type CheckOutInput, type ComparePortfolioRatesInput, ConflictError, type Coordinates, type CreateBlockInput, type CreateBookingInput, type CreateCategoryInput, type CreateChannelInput, type CreateChargeInput, type CreateFolioInput, type CreateFolioPaymentInput, type CreateGroupFolioInput, type CreateGroupInput, type CreateGuestInput, type CreateHousekeepingTaskInput, type CreateInvoiceInput, type CreateMappingInput, type CreatePaymentAccountInput, type CreatePropertyInput, type CreateRatePeriodInput, type CreateRatePlanInput, type CreateShiftInput, type CreateSpaceInput, type CreateStaffInput, DEFAULT_MODULES, type DatePickup, DistributionService, type DuplicateCandidate, FinanceService, type Folio, type FolioCharge, type FolioPayment, type FolioPostCharge, type FolioPostInput, type FolioPostItem, type FolioPostResult, type FolioStatus, ForbiddenError, type GetBoardParams, type GetNightAuditHistoryParams, type Group, type GroupBlockSummary, type GroupFolioResult, type GroupStatus, type GroupType, GroupsService, type Guest, type GuestAddress, type GuestBookingSummary, type GuestDuplicateResult, type GuestFolioSummary, type GuestHistoryParams, type GuestMatch, type GuestOrderSummary, type GuestPreferences, type GuestSearchResult, type GuestSort, GuestsService, type HousekeepingBoard, type HousekeepingBoardEntry, type HousekeepingPriority, HousekeepingService, type HousekeepingStatus, type HousekeepingTask, type HousekeepingTaskStatus, type HousekeepingTaskType, HttpClient, type HttpClientOptions, type HttpMethod, type HttpResponse, type ICalExportResult, type ICalImportInput, type ICalImportResult, type Invoice, type InvoiceStatus, type IrisInitiateInput, type IrisTransfer, type IrisTransferStatus, type LinkPosTableInput, type ListBookingsParams, type ListCategoriesParams, type ListChannelsParams, type ListChargesParams, type ListFolioPaymentsParams, type ListFolioPostParams, type ListFoliosParams, type ListGroupsParams, type ListGuestsParams, type ListHousekeepingTasksParams, type ListMappingsParams, type ListPaymentAccountsParams, type ListPropertiesParams, type ListRatePeriodsParams, type ListRatePlansParams, type ListShiftsParams, type ListSpacesParams, type ListStaffParams, type ListTransactionsParams, type Logger, type MergeGuestsInput, type MoveChargesInput, type NightAuditDiscrepancy, type NightAuditError, type NightAuditOccupancy, type NightAuditPaymentMethod, type NightAuditPayments, type NightAuditReport, type NightAuditRevenue, type NightAuditRevenueBreakdown, type NightAuditRun, NightAuditService, type NightAuditStatus, type NightAuditSummary, type NightlyRate, type NoShowInput, NotFoundError, type OccupancyStatus, PROPERTY_MODULES, type PageFetcher, type Paginated, type PaginatedBookings, type PaginatedChannels, type PaginatedCharges, type PaginatedFolioPayments, type PaginatedFolioPostCharges, type PaginatedFolios, type PaginatedGroups, type PaginatedGuestBookings, type PaginatedGuestFolios, type PaginatedGuestOrders, type PaginatedGuests, type PaginatedHousekeepingTasks, type PaginatedMappings, type PaginatedNightAuditRuns, type PaginatedPaymentAccounts, type PaginatedRatePeriods, type PaginatedRatePlans, type PaginatedStaff, type PaginatedSyncLog, type PaginatedTransactions, type PaginationOptions, type Payment, type PaymentAccount, type PaymentAccountStatus, PaymentError, type PaymentProvider, type PaymentStatus, PaymentsService, type Pickup, type PortfolioPropertyRate, type PortfolioRateComparison, type PortfolioRatePushResult, type PortfolioTargetResult, type PriceRange, type PricingParams, type PricingResult, type ProcessPaymentInput, PropertiesService, type Property, type PropertyAddress, type PropertyModules, type PropertyStatus, type PropertyType, type PullSyncInput, type PushPortfolioRatesInput, type PushSyncInput, type RateCalculation, RateLimitError, type RateModifier, type RatePeriod, type RatePlan, type RatePlanStatus, RatePlansService, type RateRestriction, type Refund, type RefundInput, type RefundStatus, type ReleaseBlocksInput, type ReleaseResult, type RequestOptions, type ResolvedBookingClientConfig, type RetryConfig, type RetryOptions, type RunNightAuditInput, SPACE_STATUSES, SPACE_TYPES, type SearchGuestsParams, ServerError, type ServiceSlotParams, type ServiceTimeSlot, type ShiftType, type Space, type SpaceCategory, type SpaceStatus, type SpaceType, SpacesService, type Staff, type StaffDepartment, type StaffRole, StaffService, type StaffShift, type StaffStatus, type SyncError, type SyncLogParams, type SyncOperation, type SyncOperationStatus, type SyncOperationType, type SyncStats, type TableSlotParams, type TerminalAuthorizeInput, type TerminalTransaction, type TerminalTransactionStatus, type TimeSlot, TimeoutError, type Transaction, type TransactionType, type UpdateBookingInput, type UpdateCategoryInput, type UpdateChannelInput, type UpdateFolioInput, type UpdateGroupInput, type UpdateGuestInput, type UpdateGuestPreferences, type UpdateHousekeepingTaskInput, type UpdatePropertyInput, type UpdateRatePeriodInput, type UpdateRatePlanInput, type UpdateRateRestrictionInput, type UpdateSpaceInput, type UpdateSpaceStatusInput, type UpdateStaffInput, VERSION, ValidationError, type VatBreakdownEntry, bookingClientConfigSchema, createErrorFromResponse, firstPage, paginate };
|