@zimmerstack/connect 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1153 @@
1
+ /** This package's version, sent as the user agent so ZimmerStack can tell which client a request came from. */
2
+ export declare const SDK_VERSION = "0.2.0";
3
+ /** Where the API lives. The key is sent nowhere else. */
4
+ export declare const API_ORIGIN = "https://api.zimmerstack.com";
5
+ export declare const API_PREFIX = "/api/v1/connect-api/v1";
6
+ export declare const IDEMPOTENCY_HEADER = "x-idempotency-key";
7
+ /** A software vendor's company key names the hotel on every request in this header (GET /properties lists them). */
8
+ export declare const PROPERTY_HEADER = "x-zs-property";
9
+ /** The published limits. A property's own figures are on GET /property (limits). */
10
+ export declare const LIMITS: {
11
+ readonly requestsPerMinute: 120;
12
+ readonly writesPerMinute: 30;
13
+ readonly propertyRequestsPerMinute: 300;
14
+ readonly propertyWritesPerMinute: 60;
15
+ readonly propertyCellsPerMinute: 20000;
16
+ readonly ipRequestsPerMinute: 240;
17
+ readonly maxUpdatesPerRequest: 1000;
18
+ readonly maxCellsPerRequest: 5000;
19
+ readonly maxBodyBytes: 1048576;
20
+ readonly horizonDays: 365;
21
+ readonly bookingsPerMinute: 20;
22
+ readonly propertyBookingsPerMinute: 40;
23
+ readonly propertyBookingsPerDay: 500;
24
+ readonly companyRequestsPerMinute: 1200;
25
+ readonly maxNightsPerBooking: 90;
26
+ };
27
+ /** Every stable error code (`error.code`). Messages are for people and may change; branch on these. */
28
+ export declare const ERROR_CODES: readonly ["API_KEY_INVALID", "API_KEY_REVOKED", "API_KEY_EXPIRED", "CONNECT_API_NOT_CONFIGURED", "IP_NOT_ALLOWED", "SCOPE_MISSING", "PROPERTY_UNAVAILABLE", "CHANNEL_MANAGER_DISABLED", "PMS_NOT_AVAILABLE", "VALIDATION", "RANGE_INVALID", "HORIZON", "TOO_MANY_UPDATES", "TOO_MANY_CELLS", "UNKNOWN_ROOM_TYPE", "UNKNOWN_RATE_PLAN", "CURRENCY_MISMATCH", "RATE_LIMITED", "NOTHING_ACCEPTED", "BATCH_NOT_FOUND", "IDEMPOTENCY_KEY_INVALID", "IDEMPOTENCY_KEY_REUSED", "IDEMPOTENCY_IN_FLIGHT", "STAY_INVALID", "UNKNOWN_ROOM_TYPE_FOR_PLAN", "OCCUPANCY_EXCEEDED", "NO_AVAILABILITY", "EXTERNAL_REFERENCE_REUSED", "PAYMENT_NOT_ALLOWED", "PAYMENT_EXCEEDS_TOTAL", "BOOKING_NOT_FOUND", "BOOKING_NOT_CANCELLABLE", "MODULE_NOT_ENTITLED", "SANDBOX_ONLY", "ROOM_TYPE_NOT_FOUND", "RATE_PLAN_NOT_FOUND", "CATALOG_CONFLICT", "CATALOG_BUSY", "CHANNEL_MANAGER_ERROR", "PROPERTY_REQUIRED", "PROPERTY_NOT_FOUND", "ARI_NOT_AUTHORITATIVE", "ROUTE_NOT_FOUND", "PAYLOAD_TOO_LARGE", "AUTH_BACKEND_UNAVAILABLE", "BOOKING_NOT_MODIFIABLE", "SANDBOX_NOT_FOUND", "SANDBOX_INCOMPLETE", "WRITES_FROZEN", "WRITES_SUSPENDED", "SHIELD_UNAVAILABLE", "CATALOG_LIMIT_REACHED", "TOO_MANY_NEW_ENTITIES", "RATE_OUT_OF_BAND", "CHANNEL_NOT_FOUND", "CHANNEL_SHARED", "MODIFIER_OUT_OF_BAND"];
29
+ export type ErrorCode = (typeof ERROR_CODES)[number];
30
+ /** What a key may do. The hotel's owner (or, for a vendor's key, the vendor) chose them when the key was made. */
31
+ export declare const SCOPES: readonly ["ari:read", "ari:write", "catalog:write", "channel-modifiers:write", "channel-bookings:read", "bookings:read", "bookings:write", "bookings:payments"];
32
+ export type Scope = (typeof SCOPES)[number];
33
+ /** When a channel's price modifier takes effect. Show it where a person saves one. */
34
+ export declare const MODIFIER_TAKES_EFFECT = "A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again.";
35
+ export interface Error {
36
+ statuscode: number;
37
+ /** Human-readable, may change; branch on data.code */
38
+ message: string;
39
+ data: {
40
+ code: "API_KEY_INVALID" | "API_KEY_REVOKED" | "API_KEY_EXPIRED" | "CONNECT_API_NOT_CONFIGURED" | "IP_NOT_ALLOWED" | "SCOPE_MISSING" | "PROPERTY_UNAVAILABLE" | "CHANNEL_MANAGER_DISABLED" | "PMS_NOT_AVAILABLE" | "VALIDATION" | "RANGE_INVALID" | "HORIZON" | "TOO_MANY_UPDATES" | "TOO_MANY_CELLS" | "UNKNOWN_ROOM_TYPE" | "UNKNOWN_RATE_PLAN" | "CURRENCY_MISMATCH" | "RATE_LIMITED" | "NOTHING_ACCEPTED" | "BATCH_NOT_FOUND" | "IDEMPOTENCY_KEY_INVALID" | "IDEMPOTENCY_KEY_REUSED" | "IDEMPOTENCY_IN_FLIGHT" | "STAY_INVALID" | "UNKNOWN_ROOM_TYPE_FOR_PLAN" | "OCCUPANCY_EXCEEDED" | "NO_AVAILABILITY" | "EXTERNAL_REFERENCE_REUSED" | "PAYMENT_NOT_ALLOWED" | "PAYMENT_EXCEEDS_TOTAL" | "BOOKING_NOT_FOUND" | "BOOKING_NOT_CANCELLABLE" | "MODULE_NOT_ENTITLED" | "SANDBOX_ONLY" | "ROOM_TYPE_NOT_FOUND" | "RATE_PLAN_NOT_FOUND" | "CATALOG_CONFLICT" | "CATALOG_BUSY" | "CHANNEL_MANAGER_ERROR" | "PROPERTY_REQUIRED" | "PROPERTY_NOT_FOUND" | "ARI_NOT_AUTHORITATIVE" | "ROUTE_NOT_FOUND" | "PAYLOAD_TOO_LARGE" | "AUTH_BACKEND_UNAVAILABLE" | "BOOKING_NOT_MODIFIABLE" | "SANDBOX_NOT_FOUND" | "SANDBOX_INCOMPLETE" | "WRITES_FROZEN" | "WRITES_SUSPENDED" | "SHIELD_UNAVAILABLE" | "CATALOG_LIMIT_REACHED" | "TOO_MANY_NEW_ENTITIES" | "RATE_OUT_OF_BAND" | "CHANNEL_NOT_FOUND" | "CHANNEL_SHARED" | "MODIFIER_OUT_OF_BAND";
41
+ details?: unknown;
42
+ };
43
+ }
44
+ export interface Property {
45
+ id: number;
46
+ name: string;
47
+ /** IANA; every date in this API is a calendar date in this zone */
48
+ timezone: string;
49
+ /** ISO 4217; every rate must be sent in it */
50
+ currency: string;
51
+ inventoryScope: "PMS_CM" | "CM_ONLY" | "PMS_CUTOVER" | "OWNER_SITE";
52
+ /** true when this key is a zsk_test_ key on the owner's sandbox: nothing you send reaches a channel, and POST /sandbox/bookings simulates an OTA booking */
53
+ sandbox: boolean;
54
+ /** last writable night = today + horizonDays */
55
+ horizonDays: number;
56
+ ariAuthoritative: boolean;
57
+ /** what THIS key may do: ari:read · ari:write · bookings:read · bookings:write · bookings:payments */
58
+ scopes: Array<string>;
59
+ products: {
60
+ /** the ARI routes need it */
61
+ channelManager: boolean;
62
+ /** the booking routes need it */
63
+ pms: boolean;
64
+ };
65
+ limits: {
66
+ requestsPerMinute: number;
67
+ writesPerMinute: number;
68
+ maxUpdatesPerRequest: number;
69
+ maxCellsPerRequest: number;
70
+ bookingsPerMinute: number;
71
+ /** Changed cells this property may take per clock hour (UTC), all its keys together. A cell that already holds the value sent is not counted */
72
+ cellsPerHour: number;
73
+ /** Changed cells this property may take per rolling 24 hours */
74
+ cellsPerDay: number;
75
+ /** Room types this property may hold */
76
+ maxRoomTypes: number;
77
+ /** Rate plans this property may hold */
78
+ maxRatePlans: number;
79
+ /** A vacation rental: rate plans this property may hold per room type, counted over the whole property. null on a hotel, where maxRatePlans is the rule */
80
+ ratePlansPerRoomType: number | null;
81
+ /** New room types or rate plans one request, and one minute, may create */
82
+ newEntitiesPerMinute: number;
83
+ };
84
+ /** What this property has used of its long budgets (§6.6) */
85
+ usage: {
86
+ /** Changed cells counted against cellsPerHour so far this clock hour */
87
+ cellsThisHour: number;
88
+ /** Changed cells counted against cellsPerDay over the last 24 hours */
89
+ cellsLast24h: number;
90
+ };
91
+ /** Where this integration stands with the channel shield. Reads and bookings are never affected */
92
+ shield: {
93
+ /** CLEAR nothing held against the integration · WATCH noted, nothing refused · PAUSED only writes that close inventory are accepted · SUSPENDED every write refused until ZimmerStack releases it */
94
+ level: "CLEAR" | "WATCH" | "PAUSED" | "SUSPENDED";
95
+ /** Why, when the level is not CLEAR */
96
+ reason: string | null;
97
+ /** When a pause ends on its own (ISO instant); null = until released, or not paused */
98
+ until: string | null;
99
+ };
100
+ sync: {
101
+ state: "IN_SYNC" | "PENDING" | "OUT_OF_SYNC" | "DISABLED";
102
+ pendingCells: number;
103
+ };
104
+ }
105
+ export interface Catalog {
106
+ /** ISO 4217; the property's, and the one every rate and booking is sent in */
107
+ currency: string;
108
+ /** Every room type on the property, stable ids, in the order they were created */
109
+ roomTypes: Array<{
110
+ /** The number every availability write and every booking room names as roomTypeId */
111
+ id: number;
112
+ /** Your own id for it, when your system wrote it through PUT /catalog/room-types; null otherwise */
113
+ ref: string | null;
114
+ /** As the owner named it in ZimmerStack */
115
+ name: string;
116
+ /** Most adults one room takes; null = not set */
117
+ maxAdults: number | null;
118
+ /** Most children one room takes; null = not set */
119
+ maxChildren: number | null;
120
+ /** "room" unless the owner chose another kind of unit */
121
+ roomKind: string;
122
+ /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */
123
+ sync: "IN_SYNC" | "PENDING" | "SENDING" | "FAILED" | "DRIFTED" | "NOT_LINKED" | "DISABLED";
124
+ }>;
125
+ /** Every rate plan, each under one room type */
126
+ ratePlans: Array<{
127
+ /** The number rate and restriction writes name as ratePlanId; optional on a booking room */
128
+ id: number;
129
+ /** Your own id for it, when your system wrote it through PUT /catalog/rate-plans; null otherwise */
130
+ ref: string | null;
131
+ /** The room type this plan sells; a booking may only pair the two */
132
+ roomTypeId: number;
133
+ /** As the owner named it */
134
+ name: string;
135
+ /** EP room only · CP breakfast · MAP half board · AP full board; null = not set */
136
+ mealPlan: "EP" | "CP" | "MAP" | "AP" | null;
137
+ /** The occupancy this plan is priced for; null = any */
138
+ occupancy: number | null;
139
+ currency: string;
140
+ /** false = a non-refundable plan */
141
+ refundable: boolean;
142
+ /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */
143
+ sync: "IN_SYNC" | "PENDING" | "SENDING" | "FAILED" | "DRIFTED" | "NOT_LINKED" | "DISABLED";
144
+ }>;
145
+ }
146
+ export interface Properties {
147
+ /** company: a software vendor's key, the hotel named in X-ZS-Property on every request. property: one hotel's own key, no header needed. */
148
+ keyKind: "company" | "property";
149
+ /** A company key: every property it may act on. A hotel key: its one property. */
150
+ properties: Array<{
151
+ /** The id a company key names in the X-ZS-Property header */
152
+ id: number;
153
+ name: string;
154
+ timezone: string;
155
+ currency: string;
156
+ /** The property publishes to its channels */
157
+ channelManager: boolean;
158
+ /** A sandbox: everything lands locally, nothing reaches a channel */
159
+ sandbox: boolean;
160
+ }>;
161
+ }
162
+ export interface RoomTypesUpsert {
163
+ /** Each ref once per request */
164
+ roomTypes: Array<{
165
+ /** Your own id for this entity: the upsert key, stable across sends (1–64 of A–Z a–z 0–9 . _ : -) */
166
+ ref: string;
167
+ /** Shown to the owner and sent to the channel manager as the title */
168
+ name: string;
169
+ /** Sellable rooms of this type. On a channel-manager-only hotel a later change is written too, to the channel manager first (its count caps what the channels sell); a count below the rooms holding upcoming stays is refused. On a hotel that runs our PMS the count comes from its room list and a different value is not written (the answer's notice says so) */
170
+ roomCount: number;
171
+ /** Most adults one room takes */
172
+ adults: number;
173
+ /** Most children one room takes; default 0 */
174
+ children?: number;
175
+ }>;
176
+ }
177
+ export interface RatePlansUpsert {
178
+ /** Each ref once per request */
179
+ ratePlans: Array<{
180
+ /** Your own id for this entity: the upsert key, stable across sends (1–64 of A–Z a–z 0–9 . _ : -) */
181
+ ref: string;
182
+ /** The room type this plan sells (GET /catalog); or name it by roomTypeRef */
183
+ roomTypeId?: number;
184
+ /** The room type by the ref you gave it, in this request or an earlier one */
185
+ roomTypeRef?: string;
186
+ /** Shown to the owner and sent to the channel manager as the title */
187
+ name: string;
188
+ /** EP room only · CP breakfast · MAP half board · AP full board; null = not set */
189
+ mealPlan?: "EP" | "CP" | "MAP" | "AP" | null;
190
+ /** The occupancy this plan is priced for; null = the room type's default */
191
+ occupancy?: number | null;
192
+ /** false = a non-refundable plan; default true */
193
+ refundable?: boolean;
194
+ /** The plan's standing price in MAJOR units (e.g. 4500 or "4500.00"), like every rate here: what new dates open at, mirrored to the channel manager. Omit to leave it; null = follow the room type's base rate */
195
+ defaultRate?: number | string | null;
196
+ /** Deprecated: the same standing price in MINOR units (paise). Send defaultRate instead; never both */
197
+ defaultRateMinor?: number | null;
198
+ }>;
199
+ }
200
+ export interface CatalogUpsertResult {
201
+ /** One per entity sent, in the order sent */
202
+ items: Array<{
203
+ ref: string;
204
+ /** The ZimmerStack id: what every availability, rate and booking write names from now on */
205
+ id: number;
206
+ /** created: new here and on the channel manager · updated: fields changed · adopted: an entity the owner had already made with this name is now yours by ref · unchanged: nothing differed */
207
+ action: "created" | "updated" | "adopted" | "unchanged";
208
+ /** IN_SYNC the channel manager has it · PENDING / SENDING on its way · FAILED stopped retrying (the owner's screen offers Retry) · DRIFTED someone changed it inside the channel manager · NOT_LINKED saved here, never added there · DISABLED the property is not connected */
209
+ sync: "IN_SYNC" | "PENDING" | "SENDING" | "FAILED" | "DRIFTED" | "NOT_LINKED" | "DISABLED";
210
+ /** Saved, but something to know (for example the property is not on the channel manager yet); null when nothing */
211
+ notice: string | null;
212
+ }>;
213
+ /** Where the property stands after this write; a sandbox always says enabled */
214
+ channelManager: {
215
+ /** The property publishes to its channels */
216
+ enabled: boolean;
217
+ /** Why not, when enabled is false (for example: a room type still has no rate plan) */
218
+ reason: string | null;
219
+ };
220
+ }
221
+ export interface CatalogDeleteResult {
222
+ id: number;
223
+ deleted: true;
224
+ /** The channel manager's copy is gone too (a sandbox has none) */
225
+ channelManagerDeleted: boolean;
226
+ /** For a room type: the plans that went with it */
227
+ deletedRatePlanIds: Array<number>;
228
+ }
229
+ export interface RangeQuery {
230
+ /** default: today in the property's timezone */
231
+ from?: string;
232
+ /** default: from + 30 days; at most 500 days after from */
233
+ to?: string;
234
+ }
235
+ export interface AvailabilityRead {
236
+ /** Hotel-local calendar date, YYYY-MM-DD */
237
+ from: string;
238
+ /** Hotel-local calendar date, YYYY-MM-DD */
239
+ to: string;
240
+ cells: Array<{
241
+ roomTypeId: number;
242
+ /** Hotel-local calendar date, YYYY-MM-DD */
243
+ date: string;
244
+ available: number;
245
+ }>;
246
+ }
247
+ export interface AvailabilityWrite {
248
+ updates: Array<{
249
+ /** ZimmerStack room type id (GET /catalog) */
250
+ roomTypeId: number;
251
+ /** Hotel-local calendar date, YYYY-MM-DD */
252
+ dateFrom: string;
253
+ /** Hotel-local calendar date, YYYY-MM-DD */
254
+ dateTo: string;
255
+ /** ABSOLUTE count of rooms of this type for sale on each night of the range */
256
+ available: number;
257
+ }>;
258
+ }
259
+ export interface RatesRead {
260
+ /** Hotel-local calendar date, YYYY-MM-DD */
261
+ from: string;
262
+ /** Hotel-local calendar date, YYYY-MM-DD */
263
+ to: string;
264
+ currency: string;
265
+ cells: Array<{
266
+ ratePlanId: number;
267
+ /** Hotel-local calendar date, YYYY-MM-DD */
268
+ date: string;
269
+ /** MINOR units (paise, cents) */
270
+ rateMinor: number;
271
+ source: "MANUAL" | "BASE" | "ENGINE" | "CHANNEX_SEED" | "PLAN_DEFAULT" | "STANDING";
272
+ }>;
273
+ }
274
+ export interface RatesWrite {
275
+ updates: Array<{
276
+ /** ZimmerStack rate plan id (GET /catalog) */
277
+ ratePlanId: number;
278
+ /** Hotel-local calendar date, YYYY-MM-DD */
279
+ dateFrom: string;
280
+ /** Hotel-local calendar date, YYYY-MM-DD */
281
+ dateTo: string;
282
+ days?: Array<"mo" | "tu" | "we" | "th" | "fr" | "sa" | "su">;
283
+ /** Nightly sell price in MAJOR units (e.g. 4500 or "4500.00"), 1 to 21474836; rounded to a whole major unit */
284
+ rate: number | string;
285
+ /** ISO 4217; must equal the property's currency (GET /property) */
286
+ currency: string;
287
+ }>;
288
+ }
289
+ export interface RestrictionsRead {
290
+ /** Hotel-local calendar date, YYYY-MM-DD */
291
+ from: string;
292
+ /** Hotel-local calendar date, YYYY-MM-DD */
293
+ to: string;
294
+ cells: Array<{
295
+ ratePlanId: number;
296
+ /** Hotel-local calendar date, YYYY-MM-DD */
297
+ date: string;
298
+ stopSell: boolean | null;
299
+ closedToArrival: boolean | null;
300
+ closedToDeparture: boolean | null;
301
+ minStayArrival: number | null;
302
+ minStayThrough: number | null;
303
+ maxStay: number | null;
304
+ }>;
305
+ }
306
+ export interface RestrictionsWrite {
307
+ updates: Array<{
308
+ /** ZimmerStack rate plan id (GET /catalog) */
309
+ ratePlanId: number;
310
+ /** Hotel-local calendar date, YYYY-MM-DD */
311
+ dateFrom: string;
312
+ /** Hotel-local calendar date, YYYY-MM-DD */
313
+ dateTo: string;
314
+ days?: Array<"mo" | "tu" | "we" | "th" | "fr" | "sa" | "su">;
315
+ stopSell?: boolean;
316
+ closedToArrival?: boolean;
317
+ closedToDeparture?: boolean;
318
+ minStayArrival?: number;
319
+ minStayThrough?: number;
320
+ maxStay?: number;
321
+ }>;
322
+ }
323
+ export interface WriteAccepted {
324
+ batchId: string;
325
+ resource: "availability" | "rates" | "restrictions";
326
+ /** distinct cells after per-request coalescing (last write wins) */
327
+ requestedCells: number;
328
+ /** cells that differed from our record and were written; they will be pushed */
329
+ acceptedCells: number;
330
+ /** cells that already held the requested value; nothing written, nothing pushed */
331
+ noopCells: number;
332
+ /** groups our record refused (e.g. a plan whose policy forbids exceptions) */
333
+ rejected: Array<{
334
+ cells: number;
335
+ error: string;
336
+ }>;
337
+ pushedBy: "inventory-drain" | "ari-projector";
338
+ /** GET path to watch this batch land */
339
+ poll: string;
340
+ /** Accepted, but worth a look: an availability above the room type's room count (an oversell the channels will sell). Absent when there is nothing to say */
341
+ warnings?: Array<{
342
+ roomTypeId: number;
343
+ /** Rooms of this type in our record */
344
+ units: number;
345
+ /** The highest count this request set for it */
346
+ requested: number;
347
+ message: string;
348
+ }>;
349
+ /** Accepted, but far outside the plan's standing price, on a property whose price band only warns (§6.6). At most 20; absent when there is nothing to say */
350
+ priceWarnings?: Array<{
351
+ ratePlanId: number;
352
+ /** Hotel-local calendar date, YYYY-MM-DD */
353
+ date: string;
354
+ /** The price this request set, MINOR units */
355
+ rateMinor: number;
356
+ /** The plan's standing price, MINOR units */
357
+ standingMinor: number;
358
+ message: string;
359
+ }>;
360
+ /** true when the write was taken through the safety lane: the integration is paused or over a budget, and this write only closed inventory (§6.6) */
361
+ lane?: boolean;
362
+ }
363
+ export interface BatchStatus {
364
+ batchId: string;
365
+ resource: "availability" | "rates" | "restrictions";
366
+ createdAt: string;
367
+ requestedCells: number;
368
+ acceptedCells: number;
369
+ noopCells: number;
370
+ rejected: Array<{
371
+ cells: number;
372
+ error: string;
373
+ }>;
374
+ status: "landed" | "pending" | "failed";
375
+ pendingCells: number;
376
+ /** Cells of this batch the channel manager refused: held, not re-sent (§6.6). More than 0 reads failed */
377
+ parkedCells: number;
378
+ lastError: string | null;
379
+ }
380
+ export interface SyncStatus {
381
+ propertyId: number;
382
+ /** true on a sandbox property (a zsk_test_ key): pushes land in our record and stop there, so IN_SYNC means recorded */
383
+ sandbox: boolean;
384
+ /** false = nothing is pushed; ask ZimmerStack support */
385
+ ariAuthoritative: boolean;
386
+ inventory: {
387
+ state: "IN_SYNC" | "PENDING" | "OUT_OF_SYNC" | "DISABLED";
388
+ pendingCells: number;
389
+ lastOkAt: string | null;
390
+ lastError: string | null;
391
+ outOfSyncSince: string | null;
392
+ };
393
+ rates: {
394
+ /** rate/restriction cells waiting for the projector */
395
+ dirtyCells: number;
396
+ /** rate/restriction cells the channel manager refused: held, no longer re-sent, their batch reads failed. Send a corrected value for those nights (§6.6) */
397
+ parkedCells: number;
398
+ lastPushAt: string | null;
399
+ lastErrorAt: string | null;
400
+ lastError: string | null;
401
+ };
402
+ /** Where this integration stands with the channel shield. Reads and bookings are never affected */
403
+ shield: {
404
+ /** CLEAR nothing held against the integration · WATCH noted, nothing refused · PAUSED only writes that close inventory are accepted · SUSPENDED every write refused until ZimmerStack releases it */
405
+ level: "CLEAR" | "WATCH" | "PAUSED" | "SUSPENDED";
406
+ /** Why, when the level is not CLEAR */
407
+ reason: string | null;
408
+ /** When a pause ends on its own (ISO instant); null = until released, or not paused */
409
+ until: string | null;
410
+ };
411
+ newestPendingBatch: {
412
+ batchId: string;
413
+ resource: "availability" | "rates" | "restrictions";
414
+ createdAt: string;
415
+ requestedCells: number;
416
+ acceptedCells: number;
417
+ noopCells: number;
418
+ rejected: Array<{
419
+ cells: number;
420
+ error: string;
421
+ }>;
422
+ status: "landed" | "pending" | "failed";
423
+ pendingCells: number;
424
+ /** Cells of this batch the channel manager refused: held, not re-sent (§6.6). More than 0 reads failed */
425
+ parkedCells: number;
426
+ lastError: string | null;
427
+ } | null;
428
+ }
429
+ export interface BookingCreate {
430
+ /** Your own reservation id; unique per property. A retried POST with the same value returns the same booking while it is live and yours; after a cancel, a new stay needs a new reference (409 EXTERNAL_REFERENCE_REUSED otherwise) */
431
+ externalReference: string;
432
+ /** Hotel-local calendar date, YYYY-MM-DD */
433
+ checkIn: string;
434
+ /** Exclusive: the checkout day is not a night */
435
+ checkOut: string;
436
+ /** ISO 4217; must equal the property's (GET /property) */
437
+ currency: string;
438
+ /** Who booked; found or created in the PMS by phone */
439
+ guest: {
440
+ /** Full name as the guest typed it */
441
+ name: string;
442
+ /** Guest phone, digits with an optional leading + */
443
+ phone: string & string;
444
+ /** Guest email, when you have it; we write to it only if the owner switches our confirmation on */
445
+ email?: string;
446
+ /** Special requests for the desk; shown in the PMS, never sent anywhere */
447
+ notes?: string;
448
+ };
449
+ /** One entry per ROOM; two rooms of the same type are two entries */
450
+ rooms: Array<{
451
+ /** ZimmerStack room type id: roomTypes[].id from GET /catalog, never guessed */
452
+ roomTypeId: number;
453
+ /** Optional: the plan the guest booked, ratePlans[].id from GET /catalog; must belong to roomTypeId. Decides the meal plan; omitted = room only (EP) */
454
+ ratePlanId?: number;
455
+ /** Adults in this room; at most the room type's maxAdults */
456
+ adults: number;
457
+ /** Children in this room; default 0; at most the room type's maxChildren */
458
+ children?: number;
459
+ /** The nightly price YOU charged for this room, MAJOR units (e.g. 4500 or "4500.00"), 1 to 21474836, taxes as you sold them */
460
+ nightlyRate: number | string;
461
+ }>;
462
+ /** Omit when nothing was collected; an amount above 0 needs the bookings:payments scope */
463
+ payment?: {
464
+ /** What you collected so far, MAJOR units; 0 = nothing collected (pay at hotel); never more than the stay's total */
465
+ amount: number | string;
466
+ /** How you collected it */
467
+ method: "ONLINE" | "CARD" | "UPI" | "NETBANKING" | "CASH";
468
+ /** Your gateway's payment or transaction id */
469
+ reference?: string;
470
+ };
471
+ /** Booking-level remarks for the desk (promo code, source page) */
472
+ notes?: string;
473
+ }
474
+ export interface BookingCancel {
475
+ /** Why; kept on the booking's activity log */
476
+ reason?: string;
477
+ }
478
+ export interface BookingsQuery {
479
+ /** Created on or after this instant (ISO 8601); default: the last 7 days */
480
+ since?: string;
481
+ /** Your own reservation id; unique per property. A retried POST with the same value returns the same booking while it is live and yours; after a cancel, a new stay needs a new reference (409 EXTERNAL_REFERENCE_REUSED otherwise) */
482
+ externalReference?: string;
483
+ /** 1 to 100; default 50 */
484
+ limit?: number;
485
+ }
486
+ export interface Booking {
487
+ bookingId: number;
488
+ reference: string;
489
+ externalReference: string | null;
490
+ status: "UPCOMING" | "INHOUSE" | "COMPLETED" | "CANCELLED" | "NOSHOW";
491
+ /** Hotel-local calendar date, YYYY-MM-DD */
492
+ checkIn: string;
493
+ /** Hotel-local calendar date, YYYY-MM-DD */
494
+ checkOut: string;
495
+ nights: number;
496
+ currency: string;
497
+ /** MAJOR units, two decimals: the whole stay */
498
+ totalAmount: string;
499
+ /** MAJOR units, two decimals: collected so far */
500
+ totalPaid: string;
501
+ /** MAJOR units, two decimals: owed at the hotel */
502
+ balanceDue: string;
503
+ guest: {
504
+ name: string;
505
+ phone: string;
506
+ email: string | null;
507
+ };
508
+ rooms: Array<{
509
+ bookingRoomId: number;
510
+ roomTypeId: number;
511
+ ratePlanId: number | null;
512
+ mealPlan: "EP" | "CP" | "MAP" | "AP";
513
+ adults: number;
514
+ children: number;
515
+ /** MAJOR units, two decimals */
516
+ nightlyRate: string;
517
+ status: "UPCOMING" | "CHECKEDIN" | "CHECKEDOUT" | "CANCELLED" | "NOSHOW";
518
+ }>;
519
+ inventory: {
520
+ eventRecorded: boolean;
521
+ /** false = this property has no channel manager; nothing is pushed */
522
+ channelManager: boolean;
523
+ pushedBy: "inventory-drain";
524
+ };
525
+ replay: boolean;
526
+ createdAt: string;
527
+ cancelledAt: string | null;
528
+ }
529
+ export interface BookingsList {
530
+ since: string;
531
+ items: Array<{
532
+ bookingId: number;
533
+ reference: string;
534
+ externalReference: string | null;
535
+ status: "UPCOMING" | "INHOUSE" | "COMPLETED" | "CANCELLED" | "NOSHOW";
536
+ /** Hotel-local calendar date, YYYY-MM-DD */
537
+ checkIn: string;
538
+ /** Hotel-local calendar date, YYYY-MM-DD */
539
+ checkOut: string;
540
+ nights: number;
541
+ currency: string;
542
+ /** MAJOR units, two decimals: the whole stay */
543
+ totalAmount: string;
544
+ /** MAJOR units, two decimals: collected so far */
545
+ totalPaid: string;
546
+ /** MAJOR units, two decimals: owed at the hotel */
547
+ balanceDue: string;
548
+ guest: {
549
+ name: string;
550
+ phone: string;
551
+ email: string | null;
552
+ };
553
+ rooms: Array<{
554
+ bookingRoomId: number;
555
+ roomTypeId: number;
556
+ ratePlanId: number | null;
557
+ mealPlan: "EP" | "CP" | "MAP" | "AP";
558
+ adults: number;
559
+ children: number;
560
+ /** MAJOR units, two decimals */
561
+ nightlyRate: string;
562
+ status: "UPCOMING" | "CHECKEDIN" | "CHECKEDOUT" | "CANCELLED" | "NOSHOW";
563
+ }>;
564
+ inventory: {
565
+ eventRecorded: boolean;
566
+ /** false = this property has no channel manager; nothing is pushed */
567
+ channelManager: boolean;
568
+ pushedBy: "inventory-drain";
569
+ };
570
+ replay: boolean;
571
+ createdAt: string;
572
+ cancelledAt: string | null;
573
+ }>;
574
+ }
575
+ export interface SandboxBookingCreate {
576
+ /** A room type of the sandbox (GET /catalog) */
577
+ roomTypeId: number;
578
+ /** Arrival, YYYY-MM-DD in the property's timezone; today or later, within the horizon */
579
+ checkIn: string;
580
+ /** 1–30; checkout = checkIn + nights */
581
+ nights: number;
582
+ /** Rooms of this type the guest books (1–5); default 1 */
583
+ rooms?: number;
584
+ /** Adults per room; default 2 */
585
+ adults?: number;
586
+ /** The guest's name; default a fictional one */
587
+ guestName?: string;
588
+ /** The channel the booking pretends to arrive from; default Booking.com */
589
+ otaName?: "Booking.com" | "Expedia" | "Agoda" | "Airbnb" | "MakeMyTrip" | "Goibibo";
590
+ /** true = the channel collected the money, so totalPaid equals the total; default false (pay at the property) */
591
+ paidByOta?: boolean;
592
+ }
593
+ export interface SandboxBookingModify {
594
+ /** New arrival, YYYY-MM-DD in the property's timezone; today or later */
595
+ checkIn?: string;
596
+ /** New length of stay, 1–30 */
597
+ nights?: number;
598
+ /** New number of rooms, 1–5 */
599
+ rooms?: number;
600
+ /** New adults per room */
601
+ adults?: number;
602
+ /** The guest renamed, as a channel sometimes does */
603
+ guestName?: string;
604
+ }
605
+ export interface Channels {
606
+ /** When the connection list was last captured; null when never */
607
+ asOf: string | null;
608
+ channels: Array<{
609
+ /** The channel manager's id for this connection */
610
+ channelId: string;
611
+ /** The channel: BookingCom, Expedia, Agoda, Airbnb, GoMMT, … */
612
+ kind: string;
613
+ /** The connection's title in the channel manager */
614
+ title: string | null;
615
+ /** When our record last saw this connection (the nightly settings sweep) */
616
+ seenAt: string;
617
+ /** Unresolved problems the channel manager reported for this connection */
618
+ openIssues: Array<{
619
+ /** sync_error · rate_error · disconnect_channel · inventory_out_of_sync · … */
620
+ event: string;
621
+ raisedAt: string;
622
+ }>;
623
+ /** This channel's price modifier (§2.8): the steps the channel manager applies, in order, to every price it sends this channel. [] = prices go as they are. null = the channel holds a rule set by hand in the channel manager that this API cannot express; PUT /channels/{channelId}/modifier replaces it */
624
+ modifier: Array<{
625
+ /** Raise or lower what this channel is sent */
626
+ action: "increase" | "decrease";
627
+ /** percent of the price, or a fixed amount in MAJOR units of the property's currency */
628
+ type: "percent" | "fixed";
629
+ /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */
630
+ value: number;
631
+ }> | null;
632
+ /** A separate adjustment the owner set for this channel in the ZimmerStack Channels app, applied before the modifier. Read-only here; null = none */
633
+ markupPlan: {
634
+ /** markup: this channel sells a copy of each plan priced a fixed step from it · manual: this channel has prices of its own for some nights */
635
+ mode: "markup" | "manual";
636
+ direction: "increase" | "decrease";
637
+ /** Percent of the price, when the step is a percentage */
638
+ percent: number | null;
639
+ /** MAJOR units, when the step is a fixed amount */
640
+ amount: number | null;
641
+ } | null;
642
+ }>;
643
+ /** Unresolved problems not tied to one connection (for example the inventory pipe out of sync) */
644
+ propertyIssues: Array<{
645
+ event: string;
646
+ raisedAt: string;
647
+ }>;
648
+ }
649
+ export interface ModifierWrite {
650
+ /** The whole modifier, in the order it is applied; replaces what the channel holds. At most 5 steps. An empty list removes it: prices go to the channel as they are */
651
+ steps: Array<{
652
+ /** Raise or lower what this channel is sent */
653
+ action: "increase" | "decrease";
654
+ /** percent of the price, or a fixed amount in MAJOR units of the property's currency */
655
+ type: "percent" | "fixed";
656
+ /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */
657
+ value: number;
658
+ }>;
659
+ }
660
+ export interface ModifierResult {
661
+ channelId: string;
662
+ /** The channel: BookingCom, Expedia, Agoda, Airbnb, GoMMT, … */
663
+ kind: string;
664
+ title: string | null;
665
+ /** What the channel holds now */
666
+ modifier: Array<{
667
+ /** Raise or lower what this channel is sent */
668
+ action: "increase" | "decrease";
669
+ /** percent of the price, or a fixed amount in MAJOR units of the property's currency */
670
+ type: "percent" | "fixed";
671
+ /** How much: 18 with type percent is 18 %; 200 with type fixed is 200.00 in the property's currency. Always positive: choose decrease instead of a minus sign. Two decimals at most */
672
+ value: number;
673
+ }>;
674
+ /** false when the channel already held exactly these steps: nothing was sent to the channel manager and nothing was counted */
675
+ changed: boolean;
676
+ /** When it takes effect. Always: "A modifier applies to prices sent to the channel after the change. Prices already on the channel stay as they are until those nights are sent again." */
677
+ notice: string;
678
+ }
679
+ export interface RatesResendAccepted {
680
+ /** Hotel-local calendar date, YYYY-MM-DD */
681
+ from: string;
682
+ /** Hotel-local calendar date, YYYY-MM-DD */
683
+ to: string;
684
+ /** Rate-plan nights marked to be sent again. They travel like any write: watch rates.dirtyCells on GET /sync fall to 0 */
685
+ cells: number;
686
+ /** Nights left out because the channel manager refused their value earlier (rates.parkedCells on GET /sync): send a corrected value for those */
687
+ parkedLeft: number;
688
+ /** GET path that says when it has landed */
689
+ watch: string;
690
+ notice: string;
691
+ }
692
+ export interface ChannelBookingsQuery {
693
+ /** Changed (created, modified or cancelled) on or after this instant (ISO 8601); default: the last 7 days */
694
+ since?: string;
695
+ /** Only confirmed (live) or only cancelled bookings; default both */
696
+ status?: "CONFIRMED" | "CANCELLED";
697
+ /** 1 to 100; default 50 */
698
+ limit?: number;
699
+ /** The previous page's nextCursor: resume exactly after its last item, even when many bookings changed in the same instant. Takes precedence over since */
700
+ cursor?: string;
701
+ }
702
+ export interface ChannelBookingsList {
703
+ /** The instant the list starts at, echoed */
704
+ since: string;
705
+ /** Oldest change first — exactly the booking object the webhooks carry */
706
+ items: Array<{
707
+ id: number;
708
+ reference: string;
709
+ status: "CONFIRMED" | "CANCELLED";
710
+ stayStatus: string;
711
+ channel: {
712
+ otaName: string;
713
+ otaReservationCode: string;
714
+ source: string;
715
+ sourceGroup: string;
716
+ };
717
+ stay: {
718
+ checkIn: string;
719
+ checkOut: string;
720
+ nights: number;
721
+ dayUse: boolean;
722
+ };
723
+ guest: {
724
+ fullName: string;
725
+ firstName: string | null;
726
+ lastName: string | null;
727
+ phone?: string | null;
728
+ email?: string | null;
729
+ country: string | null;
730
+ language: string | null;
731
+ };
732
+ guestNotes: string | null;
733
+ occupancy: {
734
+ adults: number;
735
+ children: number;
736
+ };
737
+ rooms: Array<{
738
+ roomTypeId: number;
739
+ roomTypeName: string;
740
+ ratePlanId?: number | null;
741
+ mealPlan: "EP" | "CP" | "MAP" | "AP";
742
+ adults: number;
743
+ children: number;
744
+ checkIn: string;
745
+ checkOut: string;
746
+ nights: number;
747
+ dayUse: boolean;
748
+ ratePerNight: number;
749
+ amount: number;
750
+ status: string;
751
+ }>;
752
+ amounts: {
753
+ currency: string;
754
+ total: number;
755
+ paid: number;
756
+ balanceDue: number;
757
+ paymentCollect: "ota" | "property" | "unknown";
758
+ };
759
+ finance: {
760
+ otaName: string;
761
+ amountBasis: string;
762
+ currency: string | null;
763
+ grossAmount: number | null;
764
+ commissionAmount: number | null;
765
+ taxAmount: number | null;
766
+ netPayoutAmount: number | null;
767
+ } | null;
768
+ cancellation: {
769
+ at: string;
770
+ reason: string | null;
771
+ } | null;
772
+ createdAt: string;
773
+ updatedAt: string;
774
+ }>;
775
+ /** More rows matched than limit: ask again with cursor = nextCursor */
776
+ more: boolean;
777
+ /** Pass as cursor for the next page; null when there is no more */
778
+ nextCursor: string | null;
779
+ }
780
+ export interface ChannelBooking {
781
+ id: number;
782
+ reference: string;
783
+ status: "CONFIRMED" | "CANCELLED";
784
+ stayStatus: string;
785
+ channel: {
786
+ otaName: string;
787
+ otaReservationCode: string;
788
+ source: string;
789
+ sourceGroup: string;
790
+ };
791
+ stay: {
792
+ checkIn: string;
793
+ checkOut: string;
794
+ nights: number;
795
+ dayUse: boolean;
796
+ };
797
+ guest: {
798
+ fullName: string;
799
+ firstName: string | null;
800
+ lastName: string | null;
801
+ phone?: string | null;
802
+ email?: string | null;
803
+ country: string | null;
804
+ language: string | null;
805
+ };
806
+ guestNotes: string | null;
807
+ occupancy: {
808
+ adults: number;
809
+ children: number;
810
+ };
811
+ rooms: Array<{
812
+ roomTypeId: number;
813
+ roomTypeName: string;
814
+ ratePlanId?: number | null;
815
+ mealPlan: "EP" | "CP" | "MAP" | "AP";
816
+ adults: number;
817
+ children: number;
818
+ checkIn: string;
819
+ checkOut: string;
820
+ nights: number;
821
+ dayUse: boolean;
822
+ ratePerNight: number;
823
+ amount: number;
824
+ status: string;
825
+ }>;
826
+ amounts: {
827
+ currency: string;
828
+ total: number;
829
+ paid: number;
830
+ balanceDue: number;
831
+ paymentCollect: "ota" | "property" | "unknown";
832
+ };
833
+ finance: {
834
+ otaName: string;
835
+ amountBasis: string;
836
+ currency: string | null;
837
+ grossAmount: number | null;
838
+ commissionAmount: number | null;
839
+ taxAmount: number | null;
840
+ netPayoutAmount: number | null;
841
+ } | null;
842
+ cancellation: {
843
+ at: string;
844
+ reason: string | null;
845
+ } | null;
846
+ createdAt: string;
847
+ updatedAt: string;
848
+ }
849
+ export interface SandboxBooking {
850
+ /** The PMS booking id, the one the webhook carries */
851
+ bookingId: number;
852
+ /** The booking reference, SBX-… — the webhook's booking.reference */
853
+ reference: string;
854
+ /** The pretend channel-side id */
855
+ channelBookingId: string;
856
+ otaName: string;
857
+ status: "UPCOMING" | "CANCELLED";
858
+ guestName: string;
859
+ checkIn: string;
860
+ checkOut: string;
861
+ nights: number;
862
+ rooms: number;
863
+ roomTypeId: number;
864
+ /** Major units, per room per night */
865
+ nightlyRate: number;
866
+ /** Major units */
867
+ total: number;
868
+ currency: string;
869
+ paidByOta: boolean;
870
+ /** true when a night had no sandbox availability left — the booking lands anyway, as an OTA booking would */
871
+ oversold: boolean;
872
+ createdAt: string;
873
+ /** What this call put on the wire for the sandbox's webhook endpoints */
874
+ webhook: {
875
+ eventType: "channel.booking.created" | "channel.booking.modified" | "channel.booking.cancelled";
876
+ /** The event is in the outbox; every active endpoint on the sandbox receives it within seconds */
877
+ queued: boolean;
878
+ };
879
+ }
880
+ export interface SandboxBookingsList {
881
+ /** Simulated OTA bookings on the sandbox, newest first */
882
+ bookings: Array<{
883
+ /** The PMS booking id, the one the webhook carries */
884
+ bookingId: number;
885
+ /** The booking reference, SBX-… — the webhook's booking.reference */
886
+ reference: string;
887
+ /** The pretend channel-side id */
888
+ channelBookingId: string;
889
+ otaName: string;
890
+ status: "UPCOMING" | "CANCELLED";
891
+ guestName: string;
892
+ checkIn: string;
893
+ checkOut: string;
894
+ nights: number;
895
+ rooms: number;
896
+ roomTypeId: number;
897
+ /** Major units, per room per night */
898
+ nightlyRate: number;
899
+ /** Major units */
900
+ total: number;
901
+ currency: string;
902
+ paidByOta: boolean;
903
+ /** true when a night had no sandbox availability left — the booking lands anyway, as an OTA booking would */
904
+ oversold: boolean;
905
+ createdAt: string;
906
+ /** What this call put on the wire for the sandbox's webhook endpoints */
907
+ webhook: {
908
+ eventType: "channel.booking.created" | "channel.booking.modified" | "channel.booking.cancelled";
909
+ /** The event is in the outbox; every active endpoint on the sandbox receives it within seconds */
910
+ queued: boolean;
911
+ };
912
+ }>;
913
+ }
914
+ export interface Operations {
915
+ /** The properties this key may act on */
916
+ "GET /properties": {
917
+ path: undefined;
918
+ query: undefined;
919
+ body: undefined;
920
+ response: Properties;
921
+ };
922
+ /** The property this key is for */
923
+ "GET /property": {
924
+ path: undefined;
925
+ query: undefined;
926
+ body: undefined;
927
+ response: Property;
928
+ };
929
+ /** Room types and rate plans with the numeric ids every write uses */
930
+ "GET /catalog": {
931
+ path: undefined;
932
+ query: undefined;
933
+ body: undefined;
934
+ response: Catalog;
935
+ };
936
+ /** Create or change room types by your own ref */
937
+ "PUT /catalog/room-types": {
938
+ path: undefined;
939
+ query: undefined;
940
+ body: RoomTypesUpsert;
941
+ response: CatalogUpsertResult;
942
+ };
943
+ /** Delete a room type: the channel manager's copy first, then ours; its plans go with it */
944
+ "DELETE /catalog/room-types/{roomTypeId}": {
945
+ path: {
946
+ roomTypeId: string | number;
947
+ };
948
+ query: undefined;
949
+ body: undefined;
950
+ response: CatalogDeleteResult;
951
+ };
952
+ /** Create or change rate plans by your own ref */
953
+ "PUT /catalog/rate-plans": {
954
+ path: undefined;
955
+ query: undefined;
956
+ body: RatePlansUpsert;
957
+ response: CatalogUpsertResult;
958
+ };
959
+ /** Delete a rate plan: the channel manager's copy first, then ours */
960
+ "DELETE /catalog/rate-plans/{ratePlanId}": {
961
+ path: {
962
+ ratePlanId: string | number;
963
+ };
964
+ query: undefined;
965
+ body: undefined;
966
+ response: CatalogDeleteResult;
967
+ };
968
+ /** Availability as our record holds it */
969
+ "GET /availability": {
970
+ path: undefined;
971
+ query: {
972
+ from?: string;
973
+ to?: string;
974
+ };
975
+ body: undefined;
976
+ response: AvailabilityRead;
977
+ };
978
+ /** Set absolute availability */
979
+ "PUT /availability": {
980
+ path: undefined;
981
+ query: undefined;
982
+ body: AvailabilityWrite;
983
+ response: WriteAccepted;
984
+ };
985
+ /** Rates as our record holds them (minor units) */
986
+ "GET /rates": {
987
+ path: undefined;
988
+ query: {
989
+ from?: string;
990
+ to?: string;
991
+ };
992
+ body: undefined;
993
+ response: RatesRead;
994
+ };
995
+ /** Set nightly sell prices */
996
+ "PUT /rates": {
997
+ path: undefined;
998
+ query: undefined;
999
+ body: RatesWrite;
1000
+ response: WriteAccepted;
1001
+ };
1002
+ /** Restrictions as our record holds them */
1003
+ "GET /restrictions": {
1004
+ path: undefined;
1005
+ query: {
1006
+ from?: string;
1007
+ to?: string;
1008
+ };
1009
+ body: undefined;
1010
+ response: RestrictionsRead;
1011
+ };
1012
+ /** Set stay restrictions */
1013
+ "PUT /restrictions": {
1014
+ path: undefined;
1015
+ query: undefined;
1016
+ body: RestrictionsWrite;
1017
+ response: WriteAccepted;
1018
+ };
1019
+ /** Has what you sent reached the channels? */
1020
+ "GET /sync": {
1021
+ path: undefined;
1022
+ query: undefined;
1023
+ body: undefined;
1024
+ response: SyncStatus;
1025
+ };
1026
+ /** Bookings the API created on this property, newest first */
1027
+ "GET /bookings": {
1028
+ path: undefined;
1029
+ query: {
1030
+ since?: string;
1031
+ externalReference?: string;
1032
+ limit?: number;
1033
+ };
1034
+ body: undefined;
1035
+ response: BookingsList;
1036
+ };
1037
+ /** Create a booking in the PMS from your own booking engine */
1038
+ "POST /bookings": {
1039
+ path: undefined;
1040
+ query: undefined;
1041
+ body: BookingCreate;
1042
+ response: Booking;
1043
+ };
1044
+ /** One booking the API created */
1045
+ "GET /bookings/{bookingId}": {
1046
+ path: {
1047
+ bookingId: string | number;
1048
+ };
1049
+ query: undefined;
1050
+ body: undefined;
1051
+ response: Booking;
1052
+ };
1053
+ /** Cancel a booking the API created; its nights re-open on the channels */
1054
+ "POST /bookings/{bookingId}/cancel": {
1055
+ path: {
1056
+ bookingId: string | number;
1057
+ };
1058
+ query: undefined;
1059
+ body: BookingCancel;
1060
+ response: Booking;
1061
+ };
1062
+ /** The connected channels and their open issues, from our record */
1063
+ "GET /channels": {
1064
+ path: undefined;
1065
+ query: undefined;
1066
+ body: undefined;
1067
+ response: Channels;
1068
+ };
1069
+ /** Set one channel's price modifier */
1070
+ "PUT /channels/{channelId}/modifier": {
1071
+ path: {
1072
+ channelId: string | number;
1073
+ };
1074
+ query: undefined;
1075
+ body: ModifierWrite;
1076
+ response: ModifierResult;
1077
+ };
1078
+ /** Send the property's prices to the channels again */
1079
+ "POST /rates/resend": {
1080
+ path: undefined;
1081
+ query: undefined;
1082
+ body: undefined;
1083
+ response: RatesResendAccepted;
1084
+ };
1085
+ /** The OTA bookings the channel manager delivered, in the webhook's shape */
1086
+ "GET /channel-bookings": {
1087
+ path: undefined;
1088
+ query: {
1089
+ since?: string;
1090
+ status?: "CONFIRMED" | "CANCELLED";
1091
+ limit?: number;
1092
+ cursor?: string;
1093
+ };
1094
+ body: undefined;
1095
+ response: ChannelBookingsList;
1096
+ };
1097
+ /** One channel booking, the webhook's shape */
1098
+ "GET /channel-bookings/{bookingId}": {
1099
+ path: {
1100
+ bookingId: string | number;
1101
+ };
1102
+ query: undefined;
1103
+ body: undefined;
1104
+ response: ChannelBooking;
1105
+ };
1106
+ /** Simulated OTA bookings on the sandbox, newest first */
1107
+ "GET /sandbox/bookings": {
1108
+ path: undefined;
1109
+ query: undefined;
1110
+ body: undefined;
1111
+ response: SandboxBookingsList;
1112
+ };
1113
+ /** Simulate an OTA booking on the sandbox: the booking, the inventory, the real webhook */
1114
+ "POST /sandbox/bookings": {
1115
+ path: undefined;
1116
+ query: undefined;
1117
+ body: SandboxBookingCreate;
1118
+ response: SandboxBooking;
1119
+ };
1120
+ /** The channel cancels a simulated booking: availability back, the real cancelled webhook */
1121
+ "POST /sandbox/bookings/{bookingId}/cancel": {
1122
+ path: {
1123
+ bookingId: string | number;
1124
+ };
1125
+ query: undefined;
1126
+ body: undefined;
1127
+ response: SandboxBooking;
1128
+ };
1129
+ /** The channel sends a modified revision: new dates, length, rooms or guest; the real modified webhook */
1130
+ "POST /sandbox/bookings/{bookingId}/modify": {
1131
+ path: {
1132
+ bookingId: string | number;
1133
+ };
1134
+ query: undefined;
1135
+ body: SandboxBookingModify;
1136
+ response: SandboxBooking;
1137
+ };
1138
+ /** One accepted write and whether it has landed */
1139
+ "GET /batches/{batchId}": {
1140
+ path: {
1141
+ batchId: string | number;
1142
+ };
1143
+ query: undefined;
1144
+ body: undefined;
1145
+ response: BatchStatus;
1146
+ };
1147
+ }
1148
+ export type OperationKey = keyof Operations;
1149
+ /** idempotent: the server replays the stored answer when the idempotency key repeats, so the client may resend the request after a network failure. */
1150
+ export declare const OPERATIONS: Record<OperationKey, {
1151
+ idempotent: boolean;
1152
+ bodyRequired: boolean;
1153
+ }>;