@atzentis/booking-sdk 0.1.9 → 0.1.11

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 CHANGED
@@ -35,31 +35,44 @@ __export(index_exports, {
35
35
  BookingError: () => BookingError,
36
36
  BookingsService: () => BookingsService,
37
37
  CategoriesService: () => CategoriesService,
38
+ ConciergeService: () => ConciergeService,
38
39
  ConflictError: () => ConflictError,
39
40
  DEFAULT_MODULES: () => DEFAULT_MODULES,
41
+ DiscountsService: () => DiscountsService,
40
42
  DistributionService: () => DistributionService,
41
43
  FinanceService: () => FinanceService,
44
+ FiscalService: () => FiscalService,
42
45
  ForbiddenError: () => ForbiddenError,
43
46
  GroupsService: () => GroupsService,
44
47
  GuestsService: () => GuestsService,
45
48
  HousekeepingService: () => HousekeepingService,
46
49
  HttpClient: () => HttpClient,
50
+ IdScanningService: () => IdScanningService,
51
+ IntelligenceService: () => IntelligenceService,
47
52
  NightAuditService: () => NightAuditService,
48
53
  NotFoundError: () => NotFoundError,
54
+ NotificationsService: () => NotificationsService,
49
55
  PROPERTY_MODULES: () => PROPERTY_MODULES,
50
56
  PaymentError: () => PaymentError,
51
57
  PaymentsService: () => PaymentsService,
58
+ PortfoliosService: () => PortfoliosService,
52
59
  PropertiesService: () => PropertiesService,
53
60
  RateLimitError: () => RateLimitError,
54
61
  RatePlansService: () => RatePlansService,
62
+ RevenueService: () => RevenueService,
63
+ ReviewsService: () => ReviewsService,
55
64
  SPACE_STATUSES: () => SPACE_STATUSES,
56
65
  SPACE_TYPES: () => SPACE_TYPES,
57
66
  ServerError: () => ServerError,
67
+ SettingsService: () => SettingsService,
58
68
  SpacesService: () => SpacesService,
59
69
  StaffService: () => StaffService,
70
+ SupplyService: () => SupplyService,
71
+ TasksService: () => TasksService,
60
72
  TimeoutError: () => TimeoutError,
61
73
  VERSION: () => VERSION,
62
74
  ValidationError: () => ValidationError,
75
+ WebhooksService: () => WebhooksService,
63
76
  bookingClientConfigSchema: () => bookingClientConfigSchema,
64
77
  createErrorFromResponse: () => createErrorFromResponse,
65
78
  firstPage: () => firstPage,
@@ -1100,6 +1113,176 @@ var CategoriesService = class extends BaseService {
1100
1113
  }
1101
1114
  };
1102
1115
 
1116
+ // src/services/concierge.ts
1117
+ var ConciergeService = class extends BaseService {
1118
+ constructor() {
1119
+ super(...arguments);
1120
+ this.basePath = "/concierge/v1";
1121
+ }
1122
+ // ---------------------------------------------------------------------------
1123
+ // Conversations
1124
+ // ---------------------------------------------------------------------------
1125
+ /** Create a new guest conversation */
1126
+ createConversation(input) {
1127
+ return this._post(this._buildPath("conversations"), input);
1128
+ }
1129
+ /** Get a conversation by ID */
1130
+ getConversation(conversationId) {
1131
+ return this._get(this._buildPath("conversations", conversationId));
1132
+ }
1133
+ /** List conversations with optional filters */
1134
+ listConversations(params) {
1135
+ const query = {};
1136
+ query.propertyId = params.propertyId;
1137
+ if (params.guestId !== void 0) query.guestId = params.guestId;
1138
+ if (params.status !== void 0) query.status = params.status;
1139
+ if (params.channel !== void 0) query.channel = params.channel;
1140
+ if (params.from !== void 0) query.from = params.from;
1141
+ if (params.to !== void 0) query.to = params.to;
1142
+ if (params.sortBy !== void 0) query.sortBy = params.sortBy;
1143
+ if (params.sortOrder !== void 0) query.sortOrder = params.sortOrder;
1144
+ if (params.limit !== void 0) query.limit = params.limit;
1145
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1146
+ return this._get(this._buildPath("conversations"), query);
1147
+ }
1148
+ // ---------------------------------------------------------------------------
1149
+ // Messages
1150
+ // ---------------------------------------------------------------------------
1151
+ /** Send a message in a conversation */
1152
+ sendMessage(conversationId, input) {
1153
+ return this._post(
1154
+ this._buildPath("conversations", conversationId, "messages"),
1155
+ input
1156
+ );
1157
+ }
1158
+ // ---------------------------------------------------------------------------
1159
+ // Context & Escalation
1160
+ // ---------------------------------------------------------------------------
1161
+ /** Get the full context for a conversation (property, guest, booking, FAQ) */
1162
+ getContext(conversationId) {
1163
+ return this._get(
1164
+ this._buildPath("conversations", conversationId, "context")
1165
+ );
1166
+ }
1167
+ /** Escalate a conversation to staff */
1168
+ escalate(conversationId, input) {
1169
+ return this._post(
1170
+ this._buildPath("conversations", conversationId, "escalate"),
1171
+ input ?? {}
1172
+ );
1173
+ }
1174
+ /** Resolve a conversation */
1175
+ resolve(conversationId, input) {
1176
+ return this._post(
1177
+ this._buildPath("conversations", conversationId, "resolve"),
1178
+ input ?? {}
1179
+ );
1180
+ }
1181
+ // ---------------------------------------------------------------------------
1182
+ // Templates
1183
+ // ---------------------------------------------------------------------------
1184
+ /** Create a response template */
1185
+ createTemplate(input) {
1186
+ return this._post(this._buildPath("templates"), input);
1187
+ }
1188
+ /** Get a template by ID */
1189
+ getTemplate(templateId) {
1190
+ return this._get(this._buildPath("templates", templateId));
1191
+ }
1192
+ /** List templates with optional filters */
1193
+ listTemplates(params) {
1194
+ const query = {};
1195
+ query.propertyId = params.propertyId;
1196
+ if (params.category !== void 0) query.category = params.category;
1197
+ if (params.language !== void 0) query.language = params.language;
1198
+ if (params.sortBy !== void 0) query.sortBy = params.sortBy;
1199
+ if (params.sortOrder !== void 0) query.sortOrder = params.sortOrder;
1200
+ if (params.limit !== void 0) query.limit = params.limit;
1201
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1202
+ return this._get(this._buildPath("templates"), query);
1203
+ }
1204
+ /** Update a template */
1205
+ updateTemplate(templateId, input) {
1206
+ return this._patch(this._buildPath("templates", templateId), input);
1207
+ }
1208
+ /** Delete a template */
1209
+ deleteTemplate(templateId) {
1210
+ return this._delete(this._buildPath("templates", templateId));
1211
+ }
1212
+ };
1213
+
1214
+ // src/services/discounts.ts
1215
+ var DiscountsService = class extends BaseService {
1216
+ constructor() {
1217
+ super(...arguments);
1218
+ this.basePath = "/guest/v1";
1219
+ }
1220
+ // ---------------------------------------------------------------------------
1221
+ // Rule CRUD
1222
+ // ---------------------------------------------------------------------------
1223
+ /** Create a discount rule */
1224
+ createRule(input) {
1225
+ return this._post(this._buildPath("discounts"), input);
1226
+ }
1227
+ /** Get a discount rule by ID */
1228
+ getRule(ruleId) {
1229
+ return this._get(this._buildPath("discounts", ruleId));
1230
+ }
1231
+ /** List discount rules with optional filters */
1232
+ listRules(params) {
1233
+ const query = {};
1234
+ query.propertyId = params.propertyId;
1235
+ if (params.type !== void 0) query.type = params.type;
1236
+ if (params.status !== void 0) query.status = params.status;
1237
+ if (params.enabled !== void 0) query.enabled = params.enabled;
1238
+ if (params.validOn !== void 0) query.validOn = params.validOn;
1239
+ if (params.sortBy !== void 0) query.sortBy = params.sortBy;
1240
+ if (params.sortOrder !== void 0) query.sortOrder = params.sortOrder;
1241
+ if (params.limit !== void 0) query.limit = params.limit;
1242
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1243
+ return this._get(this._buildPath("discounts"), query);
1244
+ }
1245
+ /** Update a discount rule */
1246
+ updateRule(ruleId, input) {
1247
+ return this._patch(this._buildPath("discounts", ruleId), input);
1248
+ }
1249
+ /** Delete a discount rule */
1250
+ deleteRule(ruleId) {
1251
+ return this._delete(this._buildPath("discounts", ruleId));
1252
+ }
1253
+ // ---------------------------------------------------------------------------
1254
+ // Coupons
1255
+ // ---------------------------------------------------------------------------
1256
+ /** Generate coupon codes for a discount rule */
1257
+ generateCoupons(ruleId, input) {
1258
+ return this._post(this._buildPath("discounts", ruleId, "coupons"), input ?? {});
1259
+ }
1260
+ /** Validate a coupon code against booking context */
1261
+ validateCoupon(input) {
1262
+ return this._post(this._buildPath("discounts", "validate"), input);
1263
+ }
1264
+ // ---------------------------------------------------------------------------
1265
+ // Application
1266
+ // ---------------------------------------------------------------------------
1267
+ /** Apply a discount to a booking */
1268
+ applyDiscount(input) {
1269
+ return this._post(this._buildPath("discounts", "apply"), input);
1270
+ }
1271
+ // ---------------------------------------------------------------------------
1272
+ // Usage tracking
1273
+ // ---------------------------------------------------------------------------
1274
+ /** Get usage statistics and redemption history for a discount rule */
1275
+ getUsage(ruleId, params) {
1276
+ if (!params) return this._get(this._buildPath("discounts", ruleId, "usage"));
1277
+ const query = {};
1278
+ if (params.from !== void 0) query.from = params.from;
1279
+ if (params.to !== void 0) query.to = params.to;
1280
+ if (params.limit !== void 0) query.limit = params.limit;
1281
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1282
+ return this._get(this._buildPath("discounts", ruleId, "usage"), query);
1283
+ }
1284
+ };
1285
+
1103
1286
  // src/services/distribution.ts
1104
1287
  var DistributionService = class extends BaseService {
1105
1288
  constructor() {
@@ -1353,6 +1536,77 @@ var FinanceService = class extends BaseService {
1353
1536
  }
1354
1537
  };
1355
1538
 
1539
+ // src/services/fiscal.ts
1540
+ var FiscalService = class extends BaseService {
1541
+ constructor() {
1542
+ super(...arguments);
1543
+ this.basePath = "/fiscal/v1";
1544
+ }
1545
+ // ---------------------------------------------------------------------------
1546
+ // myDATA (Greek fiscal compliance)
1547
+ // ---------------------------------------------------------------------------
1548
+ /** Get the current myDATA integration status */
1549
+ getMyDataStatus() {
1550
+ return this._get(this._buildPath("mydata", "status"));
1551
+ }
1552
+ /** Submit an invoice to the Greek AADE myDATA platform */
1553
+ submitMyData(input) {
1554
+ return this._post(this._buildPath("mydata", "submit"), input);
1555
+ }
1556
+ /** List myDATA submissions with optional filters */
1557
+ listMyDataSubmissions(params) {
1558
+ if (!params) {
1559
+ return this._get(this._buildPath("mydata", "submissions"));
1560
+ }
1561
+ const query = {};
1562
+ if (params.status !== void 0) query.status = params.status;
1563
+ if (params.from !== void 0) query.from = params.from;
1564
+ if (params.to !== void 0) query.to = params.to;
1565
+ if (params.limit !== void 0) query.limit = params.limit;
1566
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1567
+ return this._get(this._buildPath("mydata", "submissions"), query);
1568
+ }
1569
+ /** Get a single myDATA submission by ID */
1570
+ getMyDataSubmission(submissionId) {
1571
+ return this._get(this._buildPath("mydata", "submissions", submissionId));
1572
+ }
1573
+ /** Generate a QR code for a myDATA transaction */
1574
+ getMyDataQr(transactionId) {
1575
+ return this._get(this._buildPath("mydata", "qr", transactionId));
1576
+ }
1577
+ // ---------------------------------------------------------------------------
1578
+ // TSE (German fiscal compliance)
1579
+ // ---------------------------------------------------------------------------
1580
+ /** Get the current TSE device status */
1581
+ getTseStatus() {
1582
+ return this._get(this._buildPath("tse", "status"));
1583
+ }
1584
+ /** List TSE transactions with optional filters */
1585
+ listTseTransactions(params) {
1586
+ if (!params) {
1587
+ return this._get(this._buildPath("tse", "transactions"));
1588
+ }
1589
+ const query = {};
1590
+ if (params.from !== void 0) query.from = params.from;
1591
+ if (params.to !== void 0) query.to = params.to;
1592
+ if (params.limit !== void 0) query.limit = params.limit;
1593
+ if (params.cursor !== void 0) query.cursor = params.cursor;
1594
+ return this._get(this._buildPath("tse", "transactions"), query);
1595
+ }
1596
+ /** Trigger a TSE day closure */
1597
+ tseDayClosure(input) {
1598
+ return this._post(this._buildPath("tse", "day-closure"), input ?? {});
1599
+ }
1600
+ /** Export DSFinV-K data for a date range */
1601
+ tseExportDsfinvk(params) {
1602
+ const query = {};
1603
+ query.from = params.from;
1604
+ query.to = params.to;
1605
+ if (params.format !== void 0) query.format = params.format;
1606
+ return this._get(this._buildPath("tse", "export", "dsfinvk"), query);
1607
+ }
1608
+ };
1609
+
1356
1610
  // src/services/groups.ts
1357
1611
  var GroupsService = class extends BaseService {
1358
1612
  constructor() {
@@ -1749,6 +2003,77 @@ var HousekeepingService = class extends BaseService {
1749
2003
  }
1750
2004
  };
1751
2005
 
2006
+ // src/services/id-scanning.ts
2007
+ var IdScanningService = class extends BaseService {
2008
+ constructor() {
2009
+ super(...arguments);
2010
+ this.basePath = "/guest/v1/id-scans";
2011
+ }
2012
+ /** Upload a document image for OCR processing */
2013
+ upload(input) {
2014
+ const formData = new FormData();
2015
+ formData.append("guestId", input.guestId);
2016
+ formData.append(
2017
+ "file",
2018
+ input.file instanceof ArrayBuffer ? new Blob([input.file]) : input.file
2019
+ );
2020
+ formData.append("type", input.type);
2021
+ return this._post(this.basePath, formData);
2022
+ }
2023
+ /** Get the OCR result for a scan by ID */
2024
+ getResult(scanId) {
2025
+ return this._get(this._buildPath(scanId));
2026
+ }
2027
+ /** List ID scans with optional filters */
2028
+ list(params) {
2029
+ const query = {};
2030
+ query.guestId = params.guestId;
2031
+ if (params.status !== void 0) query.status = params.status;
2032
+ if (params.limit !== void 0) query.limit = params.limit;
2033
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2034
+ return this._get(this.basePath, query);
2035
+ }
2036
+ };
2037
+
2038
+ // src/services/intelligence.ts
2039
+ var IntelligenceService = class extends BaseService {
2040
+ constructor() {
2041
+ super(...arguments);
2042
+ this.basePath = "/guest/v1";
2043
+ }
2044
+ // ---------------------------------------------------------------------------
2045
+ // Profile
2046
+ // ---------------------------------------------------------------------------
2047
+ /** Get the intelligence profile for a guest */
2048
+ getProfile(guestId) {
2049
+ return this._get(this._buildPath("profiles", guestId, "intelligence"));
2050
+ }
2051
+ /** Trigger a refresh of the intelligence profile for a guest */
2052
+ refresh(guestId) {
2053
+ return this._post(
2054
+ this._buildPath("profiles", guestId, "intelligence", "refresh"),
2055
+ {}
2056
+ );
2057
+ }
2058
+ // ---------------------------------------------------------------------------
2059
+ // Events
2060
+ // ---------------------------------------------------------------------------
2061
+ /** Ingest a guest intelligence event for processing */
2062
+ ingestEvent(input) {
2063
+ return this._post(this._buildPath("intelligence", "events"), input);
2064
+ }
2065
+ /** List intelligence events for a guest with optional filters */
2066
+ listEvents(params) {
2067
+ const query = {};
2068
+ query.guestId = params.guestId;
2069
+ if (params.status !== void 0) query.status = params.status;
2070
+ if (params.type !== void 0) query.type = params.type;
2071
+ if (params.limit !== void 0) query.limit = params.limit;
2072
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2073
+ return this._get(this._buildPath("intelligence", "events"), query);
2074
+ }
2075
+ };
2076
+
1752
2077
  // src/services/night-audit.ts
1753
2078
  var NightAuditService = class extends BaseService {
1754
2079
  constructor() {
@@ -1783,6 +2108,26 @@ var NightAuditService = class extends BaseService {
1783
2108
  }
1784
2109
  };
1785
2110
 
2111
+ // src/services/notifications.ts
2112
+ var NotificationsService = class extends BaseService {
2113
+ constructor() {
2114
+ super(...arguments);
2115
+ this.basePath = "/notifications/v1";
2116
+ }
2117
+ /** Get notification preferences for a guest */
2118
+ getPreferences(guestId) {
2119
+ return this._get(this._buildPath("preferences", guestId));
2120
+ }
2121
+ /** Update notification preferences for a guest */
2122
+ updatePreferences(guestId, input) {
2123
+ return this._patch(this._buildPath("preferences", guestId), input);
2124
+ }
2125
+ /** Opt a guest out of notifications (all channels or specific ones) */
2126
+ optOut(input) {
2127
+ return this._post(this._buildPath("opt-out"), input);
2128
+ }
2129
+ };
2130
+
1786
2131
  // src/services/payments.ts
1787
2132
  var PaymentsService = class extends BaseService {
1788
2133
  constructor() {
@@ -1878,6 +2223,77 @@ var PaymentsService = class extends BaseService {
1878
2223
  }
1879
2224
  };
1880
2225
 
2226
+ // src/services/portfolios.ts
2227
+ var PortfoliosService = class extends BaseService {
2228
+ constructor() {
2229
+ super(...arguments);
2230
+ this.basePath = "/operations/v1/portfolios";
2231
+ }
2232
+ // ---------------------------------------------------------------------------
2233
+ // CRUD
2234
+ // ---------------------------------------------------------------------------
2235
+ /** Create a new portfolio */
2236
+ create(input) {
2237
+ return this._post(this.basePath, input);
2238
+ }
2239
+ /** Get a portfolio by ID including its properties */
2240
+ get(portfolioId) {
2241
+ return this._get(this._buildPath(portfolioId));
2242
+ }
2243
+ /** List portfolios with optional filters */
2244
+ list(params) {
2245
+ if (!params) return this._get(this.basePath);
2246
+ const query = {};
2247
+ if (params.limit !== void 0) query.limit = params.limit;
2248
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2249
+ if (params.search !== void 0) query.search = params.search;
2250
+ return this._get(this.basePath, query);
2251
+ }
2252
+ /** Update a portfolio */
2253
+ update(portfolioId, input) {
2254
+ return this._patch(this._buildPath(portfolioId), input);
2255
+ }
2256
+ /** Delete a portfolio */
2257
+ delete(portfolioId) {
2258
+ return this._delete(this._buildPath(portfolioId));
2259
+ }
2260
+ // ---------------------------------------------------------------------------
2261
+ // Membership
2262
+ // ---------------------------------------------------------------------------
2263
+ /** Add a property to a portfolio */
2264
+ addProperty(portfolioId, input) {
2265
+ return this._post(this._buildPath(portfolioId, "properties"), input);
2266
+ }
2267
+ /** Remove a property from a portfolio */
2268
+ removeProperty(portfolioId, propertyId) {
2269
+ return this._delete(this._buildPath(portfolioId, "properties", propertyId));
2270
+ }
2271
+ // ---------------------------------------------------------------------------
2272
+ // Dashboard
2273
+ // ---------------------------------------------------------------------------
2274
+ /** Get aggregated dashboard data for a portfolio */
2275
+ getDashboard(portfolioId, params) {
2276
+ const path = this._buildPath(portfolioId, "dashboard");
2277
+ if (!params) return this._get(path);
2278
+ const query = {};
2279
+ if (params.from !== void 0) query.from = params.from;
2280
+ if (params.to !== void 0) query.to = params.to;
2281
+ return this._get(path, query);
2282
+ }
2283
+ // ---------------------------------------------------------------------------
2284
+ // Search
2285
+ // ---------------------------------------------------------------------------
2286
+ /** Search for guests, bookings, or all records within a portfolio */
2287
+ search(portfolioId, params) {
2288
+ const query = {};
2289
+ query.query = params.query;
2290
+ if (params.type !== void 0) query.type = params.type;
2291
+ if (params.limit !== void 0) query.limit = params.limit;
2292
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2293
+ return this._get(this._buildPath(portfolioId, "search"), query);
2294
+ }
2295
+ };
2296
+
1881
2297
  // src/services/properties.ts
1882
2298
  var PropertiesService = class extends BaseService {
1883
2299
  constructor() {
@@ -2045,6 +2461,261 @@ var RatePlansService = class extends BaseService {
2045
2461
  }
2046
2462
  };
2047
2463
 
2464
+ // src/services/revenue.ts
2465
+ var RevenueService = class extends BaseService {
2466
+ constructor() {
2467
+ super(...arguments);
2468
+ this.basePath = "/revenue/v1";
2469
+ }
2470
+ // ---------------------------------------------------------------------------
2471
+ // Dashboard
2472
+ // ---------------------------------------------------------------------------
2473
+ /** Get the revenue dashboard with KPIs, occupancy, and revenue breakdown */
2474
+ getDashboard(params) {
2475
+ const query = {};
2476
+ query.propertyId = params.propertyId;
2477
+ if (params.from !== void 0) query.from = params.from;
2478
+ if (params.to !== void 0) query.to = params.to;
2479
+ if (params.compareWith !== void 0) query.compareWith = params.compareWith;
2480
+ return this._get(this._buildPath("dashboard"), query);
2481
+ }
2482
+ /** Get individual KPI metrics with optional granularity breakdown */
2483
+ getKPIs(params) {
2484
+ const query = {};
2485
+ query.propertyId = params.propertyId;
2486
+ if (params.from !== void 0) query.from = params.from;
2487
+ if (params.to !== void 0) query.to = params.to;
2488
+ if (params.metrics !== void 0) query.metrics = params.metrics.join(",");
2489
+ if (params.granularity !== void 0) query.granularity = params.granularity;
2490
+ return this._get(this._buildPath("kpis"), query);
2491
+ }
2492
+ // ---------------------------------------------------------------------------
2493
+ // Rate suggestions
2494
+ // ---------------------------------------------------------------------------
2495
+ /** List AI-generated rate suggestions with optional filters */
2496
+ listSuggestions(params) {
2497
+ const query = {};
2498
+ query.propertyId = params.propertyId;
2499
+ if (params.status !== void 0) query.status = params.status;
2500
+ if (params.ratePlanId !== void 0) query.ratePlanId = params.ratePlanId;
2501
+ if (params.from !== void 0) query.from = params.from;
2502
+ if (params.to !== void 0) query.to = params.to;
2503
+ if (params.limit !== void 0) query.limit = params.limit;
2504
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2505
+ return this._get(this._buildPath("suggestions"), query);
2506
+ }
2507
+ /** Apply a rate suggestion, updating the associated rate plan */
2508
+ applySuggestion(suggestionId) {
2509
+ return this._post(this._buildPath("suggestions", suggestionId, "apply"), {});
2510
+ }
2511
+ /** Dismiss a rate suggestion with an optional reason */
2512
+ dismissSuggestion(suggestionId, input) {
2513
+ return this._post(
2514
+ this._buildPath("suggestions", suggestionId, "dismiss"),
2515
+ input ?? {}
2516
+ );
2517
+ }
2518
+ // ---------------------------------------------------------------------------
2519
+ // Competitors
2520
+ // ---------------------------------------------------------------------------
2521
+ /** List competitors tracked for a property */
2522
+ listCompetitors(params) {
2523
+ const query = {};
2524
+ query.propertyId = params.propertyId;
2525
+ if (params.limit !== void 0) query.limit = params.limit;
2526
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2527
+ return this._get(this._buildPath("competitors"), query);
2528
+ }
2529
+ /** Get rate data scraped for a competitor over a date range */
2530
+ getCompetitorRates(competitorId, params) {
2531
+ const query = {};
2532
+ if (params !== void 0) {
2533
+ if (params.from !== void 0) query.from = params.from;
2534
+ if (params.to !== void 0) query.to = params.to;
2535
+ if (params.source !== void 0) query.source = params.source;
2536
+ }
2537
+ return this._get(
2538
+ this._buildPath("competitors", competitorId, "rates"),
2539
+ query
2540
+ );
2541
+ }
2542
+ /** Add a competitor to track for a property */
2543
+ addCompetitor(input) {
2544
+ return this._post(this._buildPath("competitors"), input);
2545
+ }
2546
+ // ---------------------------------------------------------------------------
2547
+ // Reports
2548
+ // ---------------------------------------------------------------------------
2549
+ /** Get a detailed revenue report with optional comparison period */
2550
+ getRevenueReport(params) {
2551
+ const query = {};
2552
+ query.propertyId = params.propertyId;
2553
+ query.from = params.from;
2554
+ query.to = params.to;
2555
+ if (params.groupBy !== void 0) query.groupBy = params.groupBy;
2556
+ if (params.compareWith !== void 0) query.compareWith = params.compareWith;
2557
+ return this._get(this._buildPath("reports", "revenue"), query);
2558
+ }
2559
+ /** Get a revenue forecast for a future date range */
2560
+ getForecast(params) {
2561
+ const query = {};
2562
+ query.propertyId = params.propertyId;
2563
+ query.from = params.from;
2564
+ query.to = params.to;
2565
+ if (params.model !== void 0) query.model = params.model;
2566
+ return this._get(this._buildPath("reports", "forecast"), query);
2567
+ }
2568
+ /** Get a pace report comparing current bookings against a prior period */
2569
+ getPaceReport(params) {
2570
+ const query = {};
2571
+ query.propertyId = params.propertyId;
2572
+ query.from = params.from;
2573
+ query.to = params.to;
2574
+ if (params.compareWith !== void 0) query.compareWith = params.compareWith;
2575
+ if (params.granularity !== void 0) query.granularity = params.granularity;
2576
+ return this._get(this._buildPath("reports", "pace"), query);
2577
+ }
2578
+ // ---------------------------------------------------------------------------
2579
+ // Portfolio
2580
+ // ---------------------------------------------------------------------------
2581
+ /** Get a portfolio-level dashboard with aggregated KPIs */
2582
+ getPortfolioDashboard(params) {
2583
+ const query = {};
2584
+ query.portfolioId = params.portfolioId;
2585
+ if (params.from !== void 0) query.from = params.from;
2586
+ if (params.to !== void 0) query.to = params.to;
2587
+ return this._get(this._buildPath("portfolio", "dashboard"), query);
2588
+ }
2589
+ /** Get a per-property breakdown of revenue metrics across a portfolio */
2590
+ getPortfolioBreakdown(params) {
2591
+ const query = {};
2592
+ query.portfolioId = params.portfolioId;
2593
+ if (params.from !== void 0) query.from = params.from;
2594
+ if (params.to !== void 0) query.to = params.to;
2595
+ if (params.sortBy !== void 0) query.sortBy = params.sortBy;
2596
+ if (params.sortOrder !== void 0) query.sortOrder = params.sortOrder;
2597
+ return this._get(this._buildPath("portfolio", "breakdown"), query);
2598
+ }
2599
+ /** Get a revenue forecast for all properties in a portfolio */
2600
+ getPortfolioForecast(params) {
2601
+ const query = {};
2602
+ query.portfolioId = params.portfolioId;
2603
+ if (params.from !== void 0) query.from = params.from;
2604
+ if (params.to !== void 0) query.to = params.to;
2605
+ if (params.model !== void 0) query.model = params.model;
2606
+ return this._get(this._buildPath("portfolio", "forecast"), query);
2607
+ }
2608
+ };
2609
+
2610
+ // src/services/reviews.ts
2611
+ var ReviewsService = class extends BaseService {
2612
+ constructor() {
2613
+ super(...arguments);
2614
+ this.basePath = "/guest/v1";
2615
+ }
2616
+ // ---------------------------------------------------------------------------
2617
+ // Review CRUD
2618
+ // ---------------------------------------------------------------------------
2619
+ /** Create a review */
2620
+ createReview(input) {
2621
+ return this._post(this._buildPath("reviews"), input);
2622
+ }
2623
+ /** Get a review by ID */
2624
+ getReview(reviewId) {
2625
+ return this._get(this._buildPath("reviews", reviewId));
2626
+ }
2627
+ /** List reviews with optional filters */
2628
+ listReviews(params) {
2629
+ const query = {};
2630
+ query.propertyId = params.propertyId;
2631
+ if (params.status !== void 0) query.status = params.status;
2632
+ if (params.guestId !== void 0) query.guestId = params.guestId;
2633
+ if (params.bookingId !== void 0) query.bookingId = params.bookingId;
2634
+ if (params.minRating !== void 0) query.minRating = params.minRating;
2635
+ if (params.maxRating !== void 0) query.maxRating = params.maxRating;
2636
+ if (params.from !== void 0) query.from = params.from;
2637
+ if (params.to !== void 0) query.to = params.to;
2638
+ if (params.sortBy !== void 0) query.sortBy = params.sortBy;
2639
+ if (params.sortOrder !== void 0) query.sortOrder = params.sortOrder;
2640
+ if (params.limit !== void 0) query.limit = params.limit;
2641
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2642
+ return this._get(this._buildPath("reviews"), query);
2643
+ }
2644
+ /** Update a review */
2645
+ updateReview(reviewId, input) {
2646
+ return this._patch(this._buildPath("reviews", reviewId), input);
2647
+ }
2648
+ /** Delete a review */
2649
+ deleteReview(reviewId) {
2650
+ return this._delete(this._buildPath("reviews", reviewId));
2651
+ }
2652
+ // ---------------------------------------------------------------------------
2653
+ // Moderation
2654
+ // ---------------------------------------------------------------------------
2655
+ /** Moderate a review (approve, reject, or flag) */
2656
+ moderateReview(reviewId, input) {
2657
+ return this._post(this._buildPath("reviews", reviewId, "moderate"), input);
2658
+ }
2659
+ // ---------------------------------------------------------------------------
2660
+ // Owner responses
2661
+ // ---------------------------------------------------------------------------
2662
+ /** Create an owner response to a review */
2663
+ createResponse(reviewId, input) {
2664
+ return this._post(this._buildPath("reviews", reviewId, "response"), input);
2665
+ }
2666
+ /** Update an owner response */
2667
+ updateResponse(reviewId, input) {
2668
+ return this._patch(this._buildPath("reviews", reviewId, "response"), input);
2669
+ }
2670
+ /** Delete an owner response */
2671
+ deleteResponse(reviewId) {
2672
+ return this._delete(this._buildPath("reviews", reviewId, "response"));
2673
+ }
2674
+ // ---------------------------------------------------------------------------
2675
+ // Analytics
2676
+ // ---------------------------------------------------------------------------
2677
+ /** Get review analytics for a property */
2678
+ getAnalytics(params) {
2679
+ const query = {};
2680
+ query.propertyId = params.propertyId;
2681
+ if (params.from !== void 0) query.from = params.from;
2682
+ if (params.to !== void 0) query.to = params.to;
2683
+ if (params.period !== void 0) query.period = params.period;
2684
+ return this._get(this._buildPath("reviews", "analytics"), query);
2685
+ }
2686
+ // ---------------------------------------------------------------------------
2687
+ // Review requests
2688
+ // ---------------------------------------------------------------------------
2689
+ /** Send a review request to a guest */
2690
+ sendReviewRequest(input) {
2691
+ return this._post(this._buildPath("reviews", "request"), input);
2692
+ }
2693
+ };
2694
+
2695
+ // src/services/settings.ts
2696
+ var SettingsService = class extends BaseService {
2697
+ constructor() {
2698
+ super(...arguments);
2699
+ this.basePath = "/settings/v1";
2700
+ }
2701
+ /** Get property-level settings */
2702
+ getPropertySettings() {
2703
+ return this._get(this._buildPath("property"));
2704
+ }
2705
+ /** Update property-level settings */
2706
+ updatePropertySettings(input) {
2707
+ return this._patch(this._buildPath("property"), input);
2708
+ }
2709
+ /** Get fiscal compliance settings (myDATA and TSE) */
2710
+ getFiscalSettings() {
2711
+ return this._get(this._buildPath("fiscal"));
2712
+ }
2713
+ /** Update fiscal compliance settings (myDATA and TSE) */
2714
+ updateFiscalSettings(input) {
2715
+ return this._patch(this._buildPath("fiscal"), input);
2716
+ }
2717
+ };
2718
+
2048
2719
  // src/services/spaces.ts
2049
2720
  var SpacesService = class extends BaseService {
2050
2721
  constructor() {
@@ -2237,6 +2908,171 @@ var StaffService = class extends BaseService {
2237
2908
  }
2238
2909
  };
2239
2910
 
2911
+ // src/services/supply.ts
2912
+ var SupplyService = class extends BaseService {
2913
+ constructor() {
2914
+ super(...arguments);
2915
+ this.basePath = "/operations/v1";
2916
+ }
2917
+ // ---------------------------------------------------------------------------
2918
+ // Item CRUD
2919
+ // ---------------------------------------------------------------------------
2920
+ /** Create a supply item */
2921
+ createItem(input) {
2922
+ return this._post(this._buildPath("supply-items"), input);
2923
+ }
2924
+ /** Get a supply item by ID */
2925
+ getItem(itemId) {
2926
+ return this._get(this._buildPath("supply-items", itemId));
2927
+ }
2928
+ /** List supply items with optional filters */
2929
+ listItems(params) {
2930
+ const query = {};
2931
+ query.propertyId = params.propertyId;
2932
+ if (params.category !== void 0) query.category = params.category;
2933
+ if (params.search !== void 0) query.search = params.search;
2934
+ if (params.lowStockOnly !== void 0) query.lowStockOnly = params.lowStockOnly;
2935
+ if (params.limit !== void 0) query.limit = params.limit;
2936
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2937
+ return this._get(this._buildPath("supply-items"), query);
2938
+ }
2939
+ /** Update a supply item */
2940
+ updateItem(itemId, input) {
2941
+ return this._patch(this._buildPath("supply-items", itemId), input);
2942
+ }
2943
+ /** Delete a supply item */
2944
+ deleteItem(itemId) {
2945
+ return this._delete(this._buildPath("supply-items", itemId));
2946
+ }
2947
+ // ---------------------------------------------------------------------------
2948
+ // Stock levels
2949
+ // ---------------------------------------------------------------------------
2950
+ /** Get the current stock level for a supply item */
2951
+ getLevel(itemId) {
2952
+ return this._get(this._buildPath("supply-levels", itemId));
2953
+ }
2954
+ /** List stock levels with optional filters */
2955
+ listLevels(params) {
2956
+ const query = {};
2957
+ query.propertyId = params.propertyId;
2958
+ if (params.category !== void 0) query.category = params.category;
2959
+ if (params.lowStockOnly !== void 0) query.lowStockOnly = params.lowStockOnly;
2960
+ if (params.limit !== void 0) query.limit = params.limit;
2961
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2962
+ return this._get(this._buildPath("supply-levels"), query);
2963
+ }
2964
+ /** Update a stock level manually */
2965
+ updateLevel(itemId, input) {
2966
+ return this._patch(this._buildPath("supply-levels", itemId), input);
2967
+ }
2968
+ // ---------------------------------------------------------------------------
2969
+ // Movements
2970
+ // ---------------------------------------------------------------------------
2971
+ /** Record a stock movement */
2972
+ createMovement(input) {
2973
+ return this._post(this._buildPath("supply-movements"), input);
2974
+ }
2975
+ /** List supply movements with optional filters */
2976
+ listMovements(params) {
2977
+ const query = {};
2978
+ query.propertyId = params.propertyId;
2979
+ if (params.itemId !== void 0) query.itemId = params.itemId;
2980
+ if (params.type !== void 0) query.type = params.type;
2981
+ if (params.from !== void 0) query.from = params.from;
2982
+ if (params.to !== void 0) query.to = params.to;
2983
+ if (params.limit !== void 0) query.limit = params.limit;
2984
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2985
+ return this._get(this._buildPath("supply-movements"), query);
2986
+ }
2987
+ // ---------------------------------------------------------------------------
2988
+ // Low-stock alerts
2989
+ // ---------------------------------------------------------------------------
2990
+ /** List items whose stock is at or below reorder threshold */
2991
+ listLowStock(params) {
2992
+ const query = {};
2993
+ query.propertyId = params.propertyId;
2994
+ if (params.category !== void 0) query.category = params.category;
2995
+ if (params.limit !== void 0) query.limit = params.limit;
2996
+ if (params.cursor !== void 0) query.cursor = params.cursor;
2997
+ return this._get(this._buildPath("supply-items", "low-stock"), query);
2998
+ }
2999
+ };
3000
+
3001
+ // src/services/tasks.ts
3002
+ var TasksService = class extends BaseService {
3003
+ constructor() {
3004
+ super(...arguments);
3005
+ this.basePath = "/operations/v1/tasks";
3006
+ }
3007
+ /** Create an operational task */
3008
+ create(input) {
3009
+ return this._post(this.basePath, input);
3010
+ }
3011
+ /** List operational tasks with optional filters */
3012
+ list(params) {
3013
+ if (!params) return this._get(this.basePath);
3014
+ const query = {};
3015
+ if (params.propertyId !== void 0) query.propertyId = params.propertyId;
3016
+ if (params.status !== void 0) query.status = params.status;
3017
+ if (params.priority !== void 0) query.priority = params.priority;
3018
+ if (params.assignedTo !== void 0) query.assignedTo = params.assignedTo;
3019
+ if (params.category !== void 0) query.category = params.category;
3020
+ if (params.from !== void 0) query.from = params.from;
3021
+ if (params.to !== void 0) query.to = params.to;
3022
+ if (params.limit !== void 0) query.limit = params.limit;
3023
+ if (params.cursor !== void 0) query.cursor = params.cursor;
3024
+ return this._get(this.basePath, query);
3025
+ }
3026
+ /** Update an operational task */
3027
+ update(taskId, input) {
3028
+ return this._patch(this._buildPath(taskId), input);
3029
+ }
3030
+ };
3031
+
3032
+ // src/services/webhooks.ts
3033
+ var WebhooksService = class extends BaseService {
3034
+ constructor() {
3035
+ super(...arguments);
3036
+ this.basePath = "/webhooks/v1";
3037
+ }
3038
+ /** Create a new webhook subscription */
3039
+ createSubscription(input) {
3040
+ return this._post(this._buildPath("subscriptions"), input);
3041
+ }
3042
+ /** List webhook subscriptions with optional filters */
3043
+ listSubscriptions(params) {
3044
+ if (!params) {
3045
+ return this._get(this._buildPath("subscriptions"));
3046
+ }
3047
+ const query = {};
3048
+ if (params.active !== void 0) query.active = params.active;
3049
+ if (params.limit !== void 0) query.limit = params.limit;
3050
+ if (params.cursor !== void 0) query.cursor = params.cursor;
3051
+ return this._get(this._buildPath("subscriptions"), query);
3052
+ }
3053
+ /** Update a webhook subscription */
3054
+ updateSubscription(subscriptionId, input) {
3055
+ return this._patch(
3056
+ this._buildPath("subscriptions", subscriptionId),
3057
+ input
3058
+ );
3059
+ }
3060
+ /** List webhook delivery attempts with optional filters */
3061
+ listDeliveries(params) {
3062
+ if (!params) {
3063
+ return this._get(this._buildPath("deliveries"));
3064
+ }
3065
+ const query = {};
3066
+ if (params.subscriptionId !== void 0) query.subscriptionId = params.subscriptionId;
3067
+ if (params.status !== void 0) query.status = params.status;
3068
+ if (params.from !== void 0) query.from = params.from;
3069
+ if (params.to !== void 0) query.to = params.to;
3070
+ if (params.limit !== void 0) query.limit = params.limit;
3071
+ if (params.cursor !== void 0) query.cursor = params.cursor;
3072
+ return this._get(this._buildPath("deliveries"), query);
3073
+ }
3074
+ };
3075
+
2240
3076
  // src/client.ts
2241
3077
  var BookingClient = class {
2242
3078
  constructor(config) {
@@ -2264,6 +3100,11 @@ var BookingClient = class {
2264
3100
  this._bookings ?? (this._bookings = new BookingsService(this.httpClient));
2265
3101
  return this._bookings;
2266
3102
  }
3103
+ /** Concierge service — lazy-initialized on first access */
3104
+ get concierge() {
3105
+ this._concierge ?? (this._concierge = new ConciergeService(this.httpClient));
3106
+ return this._concierge;
3107
+ }
2267
3108
  /** Distribution service — lazy-initialized on first access */
2268
3109
  get distribution() {
2269
3110
  this._distribution ?? (this._distribution = new DistributionService(this.httpClient));
@@ -2274,6 +3115,11 @@ var BookingClient = class {
2274
3115
  this._finance ?? (this._finance = new FinanceService(this.httpClient));
2275
3116
  return this._finance;
2276
3117
  }
3118
+ /** Fiscal service — lazy-initialized on first access */
3119
+ get fiscal() {
3120
+ this._fiscal ?? (this._fiscal = new FiscalService(this.httpClient));
3121
+ return this._fiscal;
3122
+ }
2277
3123
  /** Groups service — lazy-initialized on first access */
2278
3124
  get groups() {
2279
3125
  this._groups ?? (this._groups = new GroupsService(this.httpClient));
@@ -2289,16 +3135,36 @@ var BookingClient = class {
2289
3135
  this._housekeeping ?? (this._housekeeping = new HousekeepingService(this.httpClient));
2290
3136
  return this._housekeeping;
2291
3137
  }
3138
+ /** ID scanning service — lazy-initialized on first access */
3139
+ get idScanning() {
3140
+ this._idScanning ?? (this._idScanning = new IdScanningService(this.httpClient));
3141
+ return this._idScanning;
3142
+ }
3143
+ /** Intelligence service — lazy-initialized on first access */
3144
+ get intelligence() {
3145
+ this._intelligence ?? (this._intelligence = new IntelligenceService(this.httpClient));
3146
+ return this._intelligence;
3147
+ }
2292
3148
  /** Night audit service — lazy-initialized on first access */
2293
3149
  get nightAudit() {
2294
3150
  this._nightAudit ?? (this._nightAudit = new NightAuditService(this.httpClient));
2295
3151
  return this._nightAudit;
2296
3152
  }
3153
+ /** Notifications service — lazy-initialized on first access */
3154
+ get notifications() {
3155
+ this._notifications ?? (this._notifications = new NotificationsService(this.httpClient));
3156
+ return this._notifications;
3157
+ }
2297
3158
  /** Payments service — lazy-initialized on first access */
2298
3159
  get payments() {
2299
3160
  this._payments ?? (this._payments = new PaymentsService(this.httpClient));
2300
3161
  return this._payments;
2301
3162
  }
3163
+ /** Portfolios service — lazy-initialized on first access */
3164
+ get portfolios() {
3165
+ this._portfolios ?? (this._portfolios = new PortfoliosService(this.httpClient));
3166
+ return this._portfolios;
3167
+ }
2302
3168
  /** Properties service — lazy-initialized on first access */
2303
3169
  get properties() {
2304
3170
  this._properties ?? (this._properties = new PropertiesService(this.httpClient));
@@ -2309,11 +3175,31 @@ var BookingClient = class {
2309
3175
  this._ratePlans ?? (this._ratePlans = new RatePlansService(this.httpClient));
2310
3176
  return this._ratePlans;
2311
3177
  }
3178
+ /** Revenue service — lazy-initialized on first access */
3179
+ get revenue() {
3180
+ this._revenue ?? (this._revenue = new RevenueService(this.httpClient));
3181
+ return this._revenue;
3182
+ }
2312
3183
  /** Categories service — lazy-initialized on first access */
2313
3184
  get categories() {
2314
3185
  this._categories ?? (this._categories = new CategoriesService(this.httpClient));
2315
3186
  return this._categories;
2316
3187
  }
3188
+ /** Discounts service — lazy-initialized on first access */
3189
+ get discounts() {
3190
+ this._discounts ?? (this._discounts = new DiscountsService(this.httpClient));
3191
+ return this._discounts;
3192
+ }
3193
+ /** Reviews service — lazy-initialized on first access */
3194
+ get reviews() {
3195
+ this._reviews ?? (this._reviews = new ReviewsService(this.httpClient));
3196
+ return this._reviews;
3197
+ }
3198
+ /** Settings service — lazy-initialized on first access */
3199
+ get settings() {
3200
+ this._settings ?? (this._settings = new SettingsService(this.httpClient));
3201
+ return this._settings;
3202
+ }
2317
3203
  /** Spaces service — lazy-initialized on first access */
2318
3204
  get spaces() {
2319
3205
  this._spaces ?? (this._spaces = new SpacesService(this.httpClient));
@@ -2324,6 +3210,21 @@ var BookingClient = class {
2324
3210
  this._staff ?? (this._staff = new StaffService(this.httpClient));
2325
3211
  return this._staff;
2326
3212
  }
3213
+ /** Supply service — lazy-initialized on first access */
3214
+ get supply() {
3215
+ this._supply ?? (this._supply = new SupplyService(this.httpClient));
3216
+ return this._supply;
3217
+ }
3218
+ /** Tasks service — lazy-initialized on first access */
3219
+ get tasks() {
3220
+ this._tasks ?? (this._tasks = new TasksService(this.httpClient));
3221
+ return this._tasks;
3222
+ }
3223
+ /** Webhooks service — lazy-initialized on first access */
3224
+ get webhooks() {
3225
+ this._webhooks ?? (this._webhooks = new WebhooksService(this.httpClient));
3226
+ return this._webhooks;
3227
+ }
2327
3228
  setApiKey(key) {
2328
3229
  if (!key || key.trim().length === 0) {
2329
3230
  throw new Error("apiKey must be a non-empty string");
@@ -2440,31 +3341,44 @@ var VERSION = "0.1.0";
2440
3341
  BookingError,
2441
3342
  BookingsService,
2442
3343
  CategoriesService,
3344
+ ConciergeService,
2443
3345
  ConflictError,
2444
3346
  DEFAULT_MODULES,
3347
+ DiscountsService,
2445
3348
  DistributionService,
2446
3349
  FinanceService,
3350
+ FiscalService,
2447
3351
  ForbiddenError,
2448
3352
  GroupsService,
2449
3353
  GuestsService,
2450
3354
  HousekeepingService,
2451
3355
  HttpClient,
3356
+ IdScanningService,
3357
+ IntelligenceService,
2452
3358
  NightAuditService,
2453
3359
  NotFoundError,
3360
+ NotificationsService,
2454
3361
  PROPERTY_MODULES,
2455
3362
  PaymentError,
2456
3363
  PaymentsService,
3364
+ PortfoliosService,
2457
3365
  PropertiesService,
2458
3366
  RateLimitError,
2459
3367
  RatePlansService,
3368
+ RevenueService,
3369
+ ReviewsService,
2460
3370
  SPACE_STATUSES,
2461
3371
  SPACE_TYPES,
2462
3372
  ServerError,
3373
+ SettingsService,
2463
3374
  SpacesService,
2464
3375
  StaffService,
3376
+ SupplyService,
3377
+ TasksService,
2465
3378
  TimeoutError,
2466
3379
  VERSION,
2467
3380
  ValidationError,
3381
+ WebhooksService,
2468
3382
  bookingClientConfigSchema,
2469
3383
  createErrorFromResponse,
2470
3384
  firstPage,