@atzentis/booking-sdk 0.1.6 → 0.1.8

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.js CHANGED
@@ -1039,6 +1039,613 @@ var CategoriesService = class extends BaseService {
1039
1039
  }
1040
1040
  };
1041
1041
 
1042
+ // src/services/distribution.ts
1043
+ var DistributionService = class extends BaseService {
1044
+ constructor() {
1045
+ super(...arguments);
1046
+ this.basePath = "/distribution/v1";
1047
+ }
1048
+ // ---------------------------------------------------------------------------
1049
+ // Channel CRUD
1050
+ // ---------------------------------------------------------------------------
1051
+ /** Create a new distribution channel */
1052
+ createChannel(input) {
1053
+ return this._post(this._buildPath("channels"), input);
1054
+ }
1055
+ /** Get a channel by ID */
1056
+ getChannel(channelId) {
1057
+ return this._get(this._buildPath("channels", channelId));
1058
+ }
1059
+ /** List channels with optional filters */
1060
+ listChannels(params) {
1061
+ if (!params) return this._get(this._buildPath("channels"));
1062
+ const query = {};
1063
+ if (params.propertyId !== void 0) query.propertyId = params.propertyId;
1064
+ if (params.type !== void 0) query.type = params.type;
1065
+ if (params.status !== void 0) query.status = params.status;
1066
+ if (params.enabled !== void 0) query.enabled = params.enabled;
1067
+ if (params.limit !== void 0) query.limit = params.limit;
1068
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1069
+ return this._get(this._buildPath("channels"), query);
1070
+ }
1071
+ /** Update a channel */
1072
+ updateChannel(channelId, input) {
1073
+ return this._patch(this._buildPath("channels", channelId), input);
1074
+ }
1075
+ /** Delete a channel */
1076
+ deleteChannel(channelId) {
1077
+ return this._delete(this._buildPath("channels", channelId));
1078
+ }
1079
+ // ---------------------------------------------------------------------------
1080
+ // Mapping management
1081
+ // ---------------------------------------------------------------------------
1082
+ /** Create a mapping between a local category and OTA room type/rate plan */
1083
+ createMapping(channelId, input) {
1084
+ return this._post(this._buildPath("channels", channelId, "mappings"), input);
1085
+ }
1086
+ /** List mappings for a channel */
1087
+ listMappings(channelId, params) {
1088
+ if (!params) {
1089
+ return this._get(this._buildPath("channels", channelId, "mappings"));
1090
+ }
1091
+ const query = {};
1092
+ if (params.localCategoryId !== void 0) query.localCategoryId = params.localCategoryId;
1093
+ if (params.limit !== void 0) query.limit = params.limit;
1094
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1095
+ return this._get(this._buildPath("channels", channelId, "mappings"), query);
1096
+ }
1097
+ /** Delete a mapping */
1098
+ deleteMapping(channelId, mappingId) {
1099
+ return this._delete(this._buildPath("channels", channelId, "mappings", mappingId));
1100
+ }
1101
+ // ---------------------------------------------------------------------------
1102
+ // Push/pull sync
1103
+ // ---------------------------------------------------------------------------
1104
+ /** Push availability and rates to a channel */
1105
+ push(channelId, input) {
1106
+ return this._post(this._buildPath("channels", channelId, "push"), input ?? {});
1107
+ }
1108
+ /** Pull reservations from a channel */
1109
+ pull(channelId, input) {
1110
+ return this._post(this._buildPath("channels", channelId, "pull"), input ?? {});
1111
+ }
1112
+ /** Get sync operation log for a channel */
1113
+ getSyncLog(channelId, params) {
1114
+ if (!params) {
1115
+ return this._get(this._buildPath("channels", channelId, "sync-log"));
1116
+ }
1117
+ const query = {};
1118
+ if (params.type !== void 0) query.type = params.type;
1119
+ if (params.status !== void 0) query.status = params.status;
1120
+ if (params.from !== void 0) query.from = params.from;
1121
+ if (params.to !== void 0) query.to = params.to;
1122
+ if (params.limit !== void 0) query.limit = params.limit;
1123
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1124
+ return this._get(this._buildPath("channels", channelId, "sync-log"), query);
1125
+ }
1126
+ // ---------------------------------------------------------------------------
1127
+ // iCal import/export
1128
+ // ---------------------------------------------------------------------------
1129
+ /** Import availability from an external iCal feed */
1130
+ icalImport(input) {
1131
+ return this._post(this._buildPath("ical", "import"), input);
1132
+ }
1133
+ /** Get iCal export URL for a space */
1134
+ icalExport(spaceId) {
1135
+ return this._get(this._buildPath("ical", "export", spaceId));
1136
+ }
1137
+ };
1138
+
1139
+ // src/services/finance.ts
1140
+ var FinanceService = class extends BaseService {
1141
+ constructor() {
1142
+ super(...arguments);
1143
+ this.basePath = "/finance/v1";
1144
+ }
1145
+ // ---------------------------------------------------------------------------
1146
+ // Folio CRUD and lifecycle
1147
+ // ---------------------------------------------------------------------------
1148
+ /** Create a new folio for a booking */
1149
+ createFolio(input) {
1150
+ return this._post(this._buildPath("folios"), input);
1151
+ }
1152
+ /** Get a folio by ID */
1153
+ getFolio(folioId) {
1154
+ return this._get(this._buildPath("folios", folioId));
1155
+ }
1156
+ /** List folios with optional filters */
1157
+ listFolios(params) {
1158
+ if (!params) return this._get(this._buildPath("folios"));
1159
+ const query = {};
1160
+ if (params.bookingId !== void 0) query.bookingId = params.bookingId;
1161
+ if (params.guestId !== void 0) query.guestId = params.guestId;
1162
+ if (params.status !== void 0) query.status = params.status;
1163
+ if (params.limit !== void 0) query.limit = params.limit;
1164
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1165
+ return this._get(this._buildPath("folios"), query);
1166
+ }
1167
+ /** Update a folio */
1168
+ updateFolio(folioId, input) {
1169
+ return this._patch(this._buildPath("folios", folioId), input);
1170
+ }
1171
+ /** Close a folio (no more charges can be added) */
1172
+ closeFolio(folioId) {
1173
+ return this._post(this._buildPath("folios", folioId, "close"), {});
1174
+ }
1175
+ /** Settle a folio (mark as fully paid) */
1176
+ settleFolio(folioId) {
1177
+ return this._post(this._buildPath("folios", folioId, "settle"), {});
1178
+ }
1179
+ // ---------------------------------------------------------------------------
1180
+ // Charge operations
1181
+ // ---------------------------------------------------------------------------
1182
+ /** Create a charge on a folio */
1183
+ createCharge(folioId, input) {
1184
+ return this._post(this._buildPath("folios", folioId, "charges"), input);
1185
+ }
1186
+ /** List charges on a folio */
1187
+ listCharges(folioId, params) {
1188
+ if (!params) {
1189
+ return this._get(this._buildPath("folios", folioId, "charges"));
1190
+ }
1191
+ const query = {};
1192
+ if (params.type !== void 0) query.type = params.type;
1193
+ if (params.limit !== void 0) query.limit = params.limit;
1194
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1195
+ return this._get(this._buildPath("folios", folioId, "charges"), query);
1196
+ }
1197
+ /** Create a transitory (non-billable) charge on a folio */
1198
+ createTransitoryCharge(folioId, input) {
1199
+ return this._post(
1200
+ this._buildPath("folios", folioId, "charges", "transitory"),
1201
+ input
1202
+ );
1203
+ }
1204
+ /** Move charges from one folio to another */
1205
+ moveCharges(folioId, input) {
1206
+ return this._post(
1207
+ this._buildPath("folios", folioId, "charges", "move"),
1208
+ input
1209
+ );
1210
+ }
1211
+ // ---------------------------------------------------------------------------
1212
+ // Folio payment operations
1213
+ // ---------------------------------------------------------------------------
1214
+ /** Record a payment on a folio */
1215
+ createFolioPayment(folioId, input) {
1216
+ return this._post(this._buildPath("folios", folioId, "payments"), input);
1217
+ }
1218
+ /** List payments on a folio */
1219
+ listFolioPayments(folioId, params) {
1220
+ if (!params) {
1221
+ return this._get(this._buildPath("folios", folioId, "payments"));
1222
+ }
1223
+ const query = {};
1224
+ if (params.limit !== void 0) query.limit = params.limit;
1225
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1226
+ return this._get(this._buildPath("folios", folioId, "payments"), query);
1227
+ }
1228
+ // ---------------------------------------------------------------------------
1229
+ // Invoice operations
1230
+ // ---------------------------------------------------------------------------
1231
+ /** Generate an invoice for a folio */
1232
+ generateInvoice(folioId, input) {
1233
+ return this._post(this._buildPath("folios", folioId, "invoice"), input ?? {});
1234
+ }
1235
+ /** Get an invoice by ID */
1236
+ getInvoice(invoiceId) {
1237
+ return this._get(this._buildPath("invoices", invoiceId));
1238
+ }
1239
+ /** Get invoice as PDF binary data */
1240
+ getInvoicePdf(invoiceId) {
1241
+ return this._get(this._buildPath("invoices", invoiceId, "pdf"));
1242
+ }
1243
+ // ---------------------------------------------------------------------------
1244
+ // Accounting reports
1245
+ // ---------------------------------------------------------------------------
1246
+ /** Get daily accounting report */
1247
+ getDailyReport(params) {
1248
+ if (!params) return this._get(this._buildPath("accounting", "daily"));
1249
+ const query = {};
1250
+ if (params.date !== void 0) query.date = params.date;
1251
+ if (params.propertyId !== void 0) query.propertyId = params.propertyId;
1252
+ return this._get(this._buildPath("accounting", "daily"), query);
1253
+ }
1254
+ /** Get revenue report by charge type */
1255
+ getRevenueReport(params) {
1256
+ if (!params)
1257
+ return this._get(this._buildPath("accounting", "revenue"));
1258
+ const query = {};
1259
+ if (params.from !== void 0) query.from = params.from;
1260
+ if (params.to !== void 0) query.to = params.to;
1261
+ if (params.propertyId !== void 0) query.propertyId = params.propertyId;
1262
+ return this._get(this._buildPath("accounting", "revenue"), query);
1263
+ }
1264
+ /** Get VAT accounting report */
1265
+ getVatReport(params) {
1266
+ if (!params) return this._get(this._buildPath("accounting", "vat"));
1267
+ const query = {};
1268
+ if (params.from !== void 0) query.from = params.from;
1269
+ if (params.to !== void 0) query.to = params.to;
1270
+ if (params.propertyId !== void 0) query.propertyId = params.propertyId;
1271
+ return this._get(this._buildPath("accounting", "vat"), query);
1272
+ }
1273
+ };
1274
+
1275
+ // src/services/guests.ts
1276
+ var GuestsService = class extends BaseService {
1277
+ constructor() {
1278
+ super(...arguments);
1279
+ this.basePath = "/guest/v1/profiles";
1280
+ }
1281
+ // ---------------------------------------------------------------------------
1282
+ // CRUD
1283
+ // ---------------------------------------------------------------------------
1284
+ /**
1285
+ * Create a new guest profile.
1286
+ *
1287
+ * @example
1288
+ * ```typescript
1289
+ * const guest = await client.guests.create({
1290
+ * firstName: "Maria",
1291
+ * lastName: "Papadopoulou",
1292
+ * email: "maria@example.com",
1293
+ * phone: "+30 210 1234567",
1294
+ * nationality: "GR",
1295
+ * });
1296
+ * ```
1297
+ */
1298
+ create(input) {
1299
+ return this._post(this.basePath, input);
1300
+ }
1301
+ /**
1302
+ * Get a single guest by ID.
1303
+ *
1304
+ * @example
1305
+ * ```typescript
1306
+ * const guest = await client.guests.get("guest_42");
1307
+ * ```
1308
+ */
1309
+ get(guestId) {
1310
+ return this._get(this._buildPath(guestId));
1311
+ }
1312
+ /**
1313
+ * List guests with optional filters and cursor-based pagination.
1314
+ *
1315
+ * @example
1316
+ * ```typescript
1317
+ * const page = await client.guests.list({
1318
+ * tags: ["vip", "returning"],
1319
+ * sort: { field: "lastName", direction: "asc" },
1320
+ * limit: 20,
1321
+ * });
1322
+ * ```
1323
+ */
1324
+ list(params) {
1325
+ if (!params) {
1326
+ return this._get(this.basePath);
1327
+ }
1328
+ const query = {};
1329
+ if (params.tags !== void 0 && params.tags.length > 0) {
1330
+ query.tags = params.tags.join(",");
1331
+ }
1332
+ if (params.source !== void 0) query.source = params.source;
1333
+ if (params.createdFrom !== void 0) query.createdFrom = params.createdFrom;
1334
+ if (params.createdTo !== void 0) query.createdTo = params.createdTo;
1335
+ if (params.sort !== void 0) {
1336
+ query.sort = `${params.sort.field}:${params.sort.direction}`;
1337
+ }
1338
+ if (params.limit !== void 0) query.limit = params.limit;
1339
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1340
+ return this._get(this.basePath, query);
1341
+ }
1342
+ /**
1343
+ * Update an existing guest profile.
1344
+ *
1345
+ * @example
1346
+ * ```typescript
1347
+ * const updated = await client.guests.update("guest_42", {
1348
+ * email: "maria.new@example.com",
1349
+ * tags: ["vip"],
1350
+ * });
1351
+ * ```
1352
+ */
1353
+ update(guestId, input) {
1354
+ return this._patch(this._buildPath(guestId), input);
1355
+ }
1356
+ /**
1357
+ * Delete a guest profile (soft-delete).
1358
+ *
1359
+ * @example
1360
+ * ```typescript
1361
+ * await client.guests.delete("guest_42");
1362
+ * ```
1363
+ */
1364
+ delete(guestId) {
1365
+ return this._delete(this._buildPath(guestId));
1366
+ }
1367
+ // ---------------------------------------------------------------------------
1368
+ // Search and Duplicate Detection
1369
+ // ---------------------------------------------------------------------------
1370
+ /**
1371
+ * Search guests by name, email, phone, or passport number.
1372
+ *
1373
+ * Returns results sorted by relevance score (highest first).
1374
+ *
1375
+ * @param query - Search query string
1376
+ * @param params - Optional search parameters (limit, fields)
1377
+ *
1378
+ * @example
1379
+ * ```typescript
1380
+ * // Search by name
1381
+ * const results = await client.guests.search("Papadopoulos");
1382
+ *
1383
+ * // Search by email with field filter
1384
+ * const results2 = await client.guests.search("maria@", {
1385
+ * fields: ["email"],
1386
+ * limit: 5,
1387
+ * });
1388
+ * ```
1389
+ */
1390
+ search(query, params) {
1391
+ const searchQuery = {
1392
+ q: query
1393
+ };
1394
+ if (params?.limit !== void 0) searchQuery.limit = params.limit;
1395
+ if (params?.fields !== void 0 && params.fields.length > 0) {
1396
+ searchQuery.fields = params.fields.join(",");
1397
+ }
1398
+ return this._get(this._buildPath("search"), searchQuery);
1399
+ }
1400
+ /**
1401
+ * Find potential duplicate profiles for a guest.
1402
+ *
1403
+ * Returns candidates sorted by confidence score (highest first).
1404
+ *
1405
+ * @throws {NotFoundError} 404 if the guest is not found
1406
+ *
1407
+ * @example
1408
+ * ```typescript
1409
+ * const duplicates = await client.guests.findDuplicates("guest_42");
1410
+ * for (const dup of duplicates.data) {
1411
+ * console.log(`${dup.guest.firstName} — ${dup.confidence} (${dup.matchedFields})`);
1412
+ * }
1413
+ * ```
1414
+ */
1415
+ findDuplicates(guestId) {
1416
+ return this._get(this._buildPath(guestId, "duplicates"));
1417
+ }
1418
+ // ---------------------------------------------------------------------------
1419
+ // Merge
1420
+ // ---------------------------------------------------------------------------
1421
+ /**
1422
+ * Merge duplicate guest profiles into a primary profile.
1423
+ *
1424
+ * **Warning: This operation is irreversible.** All history from duplicate
1425
+ * profiles is transferred to the primary. Duplicate profiles are soft-deleted.
1426
+ *
1427
+ * @throws {NotFoundError} 404 if primary or any duplicate is not found
1428
+ * @throws {ConflictError} 409 if attempting to merge a guest into itself
1429
+ * @throws {ValidationError} 400 if duplicateIds is empty
1430
+ *
1431
+ * @example
1432
+ * ```typescript
1433
+ * const merged = await client.guests.merge("guest_primary", {
1434
+ * duplicateIds: ["guest_dup1", "guest_dup2"],
1435
+ * });
1436
+ * ```
1437
+ */
1438
+ merge(primaryId, input) {
1439
+ return this._post(this._buildPath(primaryId, "merge"), input);
1440
+ }
1441
+ // ---------------------------------------------------------------------------
1442
+ // Preferences
1443
+ // ---------------------------------------------------------------------------
1444
+ /**
1445
+ * Get guest preferences.
1446
+ *
1447
+ * Returns default/empty preferences if none have been set (does not throw 404).
1448
+ *
1449
+ * @throws {NotFoundError} 404 if the guest is not found
1450
+ *
1451
+ * @example
1452
+ * ```typescript
1453
+ * const prefs = await client.guests.getPreferences("guest_42");
1454
+ * console.log(prefs.dietary, prefs.roomType);
1455
+ * ```
1456
+ */
1457
+ getPreferences(guestId) {
1458
+ return this._get(this._buildPath(guestId, "preferences"));
1459
+ }
1460
+ /**
1461
+ * Update guest preferences (partial merge).
1462
+ *
1463
+ * Only provided fields are updated; unspecified fields retain their values.
1464
+ *
1465
+ * @throws {NotFoundError} 404 if the guest is not found
1466
+ *
1467
+ * @example
1468
+ * ```typescript
1469
+ * const updated = await client.guests.updatePreferences("guest_42", {
1470
+ * dietary: ["vegetarian"],
1471
+ * roomType: "suite",
1472
+ * custom: { pillow: "firm" },
1473
+ * });
1474
+ * ```
1475
+ */
1476
+ updatePreferences(guestId, input) {
1477
+ return this._patch(this._buildPath(guestId, "preferences"), input);
1478
+ }
1479
+ // ---------------------------------------------------------------------------
1480
+ // Cross-Domain History
1481
+ // ---------------------------------------------------------------------------
1482
+ /**
1483
+ * Get a guest's booking history.
1484
+ *
1485
+ * Returns lightweight booking summaries with pagination support.
1486
+ *
1487
+ * @throws {NotFoundError} 404 if the guest is not found
1488
+ *
1489
+ * @example
1490
+ * ```typescript
1491
+ * const bookings = await client.guests.getBookings("guest_42", {
1492
+ * from: "2025-01-01",
1493
+ * to: "2025-12-31",
1494
+ * limit: 10,
1495
+ * });
1496
+ * ```
1497
+ */
1498
+ getBookings(guestId, params) {
1499
+ return this._get(
1500
+ this._buildPath(guestId, "bookings"),
1501
+ params ? this._buildHistoryQuery(params) : void 0
1502
+ );
1503
+ }
1504
+ /**
1505
+ * Get a guest's folio history.
1506
+ *
1507
+ * Returns lightweight folio summaries with pagination support.
1508
+ *
1509
+ * @throws {NotFoundError} 404 if the guest is not found
1510
+ *
1511
+ * @example
1512
+ * ```typescript
1513
+ * const folios = await client.guests.getFolios("guest_42");
1514
+ * ```
1515
+ */
1516
+ getFolios(guestId, params) {
1517
+ return this._get(
1518
+ this._buildPath(guestId, "folios"),
1519
+ params ? this._buildHistoryQuery(params) : void 0
1520
+ );
1521
+ }
1522
+ /**
1523
+ * Get a guest's order history.
1524
+ *
1525
+ * Returns lightweight order summaries with pagination support.
1526
+ *
1527
+ * @throws {NotFoundError} 404 if the guest is not found
1528
+ *
1529
+ * @example
1530
+ * ```typescript
1531
+ * const orders = await client.guests.getOrders("guest_42", {
1532
+ * limit: 5,
1533
+ * cursor: "next_page",
1534
+ * });
1535
+ * ```
1536
+ */
1537
+ getOrders(guestId, params) {
1538
+ return this._get(
1539
+ this._buildPath(guestId, "orders"),
1540
+ params ? this._buildHistoryQuery(params) : void 0
1541
+ );
1542
+ }
1543
+ /** Build query params from GuestHistoryParams, omitting undefined values */
1544
+ _buildHistoryQuery(params) {
1545
+ const query = {};
1546
+ if (params.limit !== void 0) query.limit = params.limit;
1547
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1548
+ if (params.from !== void 0) query.from = params.from;
1549
+ if (params.to !== void 0) query.to = params.to;
1550
+ return query;
1551
+ }
1552
+ };
1553
+
1554
+ // src/services/payments.ts
1555
+ var PaymentsService = class extends BaseService {
1556
+ constructor() {
1557
+ super(...arguments);
1558
+ this.basePath = "/payment/v1";
1559
+ }
1560
+ // ---------------------------------------------------------------------------
1561
+ // Process and refund
1562
+ // ---------------------------------------------------------------------------
1563
+ /** Process a payment for a booking */
1564
+ process(input) {
1565
+ return this._post(this._buildPath("payments"), input);
1566
+ }
1567
+ /** Refund a payment (full or partial) */
1568
+ refund(paymentId, input) {
1569
+ return this._post(this._buildPath("payments", paymentId, "refund"), input ?? {});
1570
+ }
1571
+ // ---------------------------------------------------------------------------
1572
+ // Transactions
1573
+ // ---------------------------------------------------------------------------
1574
+ /** Get a transaction by ID */
1575
+ getTransaction(transactionId) {
1576
+ return this._get(this._buildPath("transactions", transactionId));
1577
+ }
1578
+ /** List transactions with optional filters */
1579
+ listTransactions(params) {
1580
+ if (!params) return this._get(this._buildPath("transactions"));
1581
+ const query = {};
1582
+ if (params.bookingId !== void 0) query.bookingId = params.bookingId;
1583
+ if (params.status !== void 0) query.status = params.status;
1584
+ if (params.provider !== void 0) query.provider = params.provider;
1585
+ if (params.type !== void 0) query.type = params.type;
1586
+ if (params.from !== void 0) query.from = params.from;
1587
+ if (params.to !== void 0) query.to = params.to;
1588
+ if (params.limit !== void 0) query.limit = params.limit;
1589
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1590
+ return this._get(this._buildPath("transactions"), query);
1591
+ }
1592
+ // ---------------------------------------------------------------------------
1593
+ // Payment accounts (stored cards)
1594
+ // ---------------------------------------------------------------------------
1595
+ /** Create a payment account (store a card on file) */
1596
+ createAccount(input) {
1597
+ return this._post(this._buildPath("accounts"), input);
1598
+ }
1599
+ /** Get a payment account by ID */
1600
+ getAccount(accountId) {
1601
+ return this._get(this._buildPath("accounts", accountId));
1602
+ }
1603
+ /** List payment accounts with optional filters */
1604
+ listAccounts(params) {
1605
+ if (!params) return this._get(this._buildPath("accounts"));
1606
+ const query = {};
1607
+ if (params.bookingId !== void 0) query.bookingId = params.bookingId;
1608
+ if (params.guestId !== void 0) query.guestId = params.guestId;
1609
+ if (params.status !== void 0) query.status = params.status;
1610
+ if (params.limit !== void 0) query.limit = params.limit;
1611
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1612
+ return this._get(this._buildPath("accounts"), query);
1613
+ }
1614
+ /** Delete a payment account */
1615
+ deleteAccount(accountId) {
1616
+ return this._delete(this._buildPath("accounts", accountId));
1617
+ }
1618
+ // ---------------------------------------------------------------------------
1619
+ // Authorize and capture
1620
+ // ---------------------------------------------------------------------------
1621
+ /** Authorize a hold on a stored card */
1622
+ authorize(accountId, input) {
1623
+ return this._post(this._buildPath("accounts", accountId, "authorize"), input);
1624
+ }
1625
+ /** Capture a previously authorized hold */
1626
+ capture(accountId, input) {
1627
+ return this._post(this._buildPath("accounts", accountId, "capture"), input);
1628
+ }
1629
+ // ---------------------------------------------------------------------------
1630
+ // Terminal operations
1631
+ // ---------------------------------------------------------------------------
1632
+ /** Initiate a POS terminal payment authorization */
1633
+ terminalAuthorize(input) {
1634
+ return this._post(this._buildPath("terminal", "authorize"), input);
1635
+ }
1636
+ // ---------------------------------------------------------------------------
1637
+ // IRIS operations
1638
+ // ---------------------------------------------------------------------------
1639
+ /** Initiate an IRIS instant bank transfer */
1640
+ irisInitiate(input) {
1641
+ return this._post(this._buildPath("iris", "initiate"), input);
1642
+ }
1643
+ /** Get the status of an IRIS transfer */
1644
+ irisStatus(transferId) {
1645
+ return this._get(this._buildPath("iris", transferId));
1646
+ }
1647
+ };
1648
+
1042
1649
  // src/services/properties.ts
1043
1650
  var PropertiesService = class extends BaseService {
1044
1651
  constructor() {
@@ -1268,6 +1875,26 @@ var BookingClient = class {
1268
1875
  this._bookings ?? (this._bookings = new BookingsService(this.httpClient));
1269
1876
  return this._bookings;
1270
1877
  }
1878
+ /** Distribution service — lazy-initialized on first access */
1879
+ get distribution() {
1880
+ this._distribution ?? (this._distribution = new DistributionService(this.httpClient));
1881
+ return this._distribution;
1882
+ }
1883
+ /** Finance service — lazy-initialized on first access */
1884
+ get finance() {
1885
+ this._finance ?? (this._finance = new FinanceService(this.httpClient));
1886
+ return this._finance;
1887
+ }
1888
+ /** Guests service — lazy-initialized on first access */
1889
+ get guests() {
1890
+ this._guests ?? (this._guests = new GuestsService(this.httpClient));
1891
+ return this._guests;
1892
+ }
1893
+ /** Payments service — lazy-initialized on first access */
1894
+ get payments() {
1895
+ this._payments ?? (this._payments = new PaymentsService(this.httpClient));
1896
+ return this._payments;
1897
+ }
1271
1898
  /** Properties service — lazy-initialized on first access */
1272
1899
  get properties() {
1273
1900
  this._properties ?? (this._properties = new PropertiesService(this.httpClient));
@@ -1400,11 +2027,15 @@ export {
1400
2027
  CategoriesService,
1401
2028
  ConflictError,
1402
2029
  DEFAULT_MODULES,
2030
+ DistributionService,
2031
+ FinanceService,
1403
2032
  ForbiddenError,
2033
+ GuestsService,
1404
2034
  HttpClient,
1405
2035
  NotFoundError,
1406
2036
  PROPERTY_MODULES,
1407
2037
  PaymentError,
2038
+ PaymentsService,
1408
2039
  PropertiesService,
1409
2040
  RateLimitError,
1410
2041
  SPACE_STATUSES,