@atzentis/booking-sdk 0.1.8 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +363 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +964 -2
- package/dist/index.d.ts +964 -2
- package/dist/index.js +358 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1450,7 +1450,7 @@ interface ListFoliosParams {
|
|
|
1450
1450
|
/** Paginated list of folios */
|
|
1451
1451
|
type PaginatedFolios = Paginated<Folio>;
|
|
1452
1452
|
/** Type of charge applied to a folio */
|
|
1453
|
-
type ChargeType = "room" | "minibar" | "restaurant" | "spa" | "parking" | "telephone" | "laundry" | "other";
|
|
1453
|
+
type ChargeType = "room" | "minibar" | "restaurant" | "spa" | "parking" | "telephone" | "laundry" | "pos" | "other";
|
|
1454
1454
|
/** A charge on a folio */
|
|
1455
1455
|
interface FolioCharge {
|
|
1456
1456
|
id: string;
|
|
@@ -1568,6 +1568,56 @@ interface AccountingReportParams {
|
|
|
1568
1568
|
to?: string;
|
|
1569
1569
|
propertyId?: string;
|
|
1570
1570
|
}
|
|
1571
|
+
/** A line item in a POS order */
|
|
1572
|
+
interface FolioPostItem {
|
|
1573
|
+
name: string;
|
|
1574
|
+
quantity: number;
|
|
1575
|
+
unitPrice: number;
|
|
1576
|
+
category: string;
|
|
1577
|
+
}
|
|
1578
|
+
/** Input for posting a POS charge to a folio */
|
|
1579
|
+
interface FolioPostInput {
|
|
1580
|
+
folioId: string;
|
|
1581
|
+
posOrderId: string;
|
|
1582
|
+
amount: number;
|
|
1583
|
+
posTerminalId?: string;
|
|
1584
|
+
items?: FolioPostItem[];
|
|
1585
|
+
description?: string;
|
|
1586
|
+
currency?: string;
|
|
1587
|
+
metadata?: Record<string, unknown>;
|
|
1588
|
+
}
|
|
1589
|
+
/** Result of posting a POS charge */
|
|
1590
|
+
interface FolioPostResult {
|
|
1591
|
+
chargeId: string;
|
|
1592
|
+
folioId: string;
|
|
1593
|
+
posOrderId: string;
|
|
1594
|
+
amount: number;
|
|
1595
|
+
status: "posted";
|
|
1596
|
+
postedAt: string;
|
|
1597
|
+
}
|
|
1598
|
+
/** A POS charge with full provenance metadata */
|
|
1599
|
+
interface FolioPostCharge {
|
|
1600
|
+
chargeId: string;
|
|
1601
|
+
folioId: string;
|
|
1602
|
+
posOrderId: string;
|
|
1603
|
+
posTerminalId: string | null;
|
|
1604
|
+
amount: number;
|
|
1605
|
+
description: string | null;
|
|
1606
|
+
items: FolioPostItem[];
|
|
1607
|
+
currency: string;
|
|
1608
|
+
postedAt: string;
|
|
1609
|
+
metadata: Record<string, unknown> | null;
|
|
1610
|
+
}
|
|
1611
|
+
/** Parameters for listing POS charges on a folio */
|
|
1612
|
+
interface ListFolioPostParams {
|
|
1613
|
+
posTerminalId?: string;
|
|
1614
|
+
from?: string;
|
|
1615
|
+
to?: string;
|
|
1616
|
+
limit?: number;
|
|
1617
|
+
cursor?: string;
|
|
1618
|
+
}
|
|
1619
|
+
/** Paginated list of POS charges */
|
|
1620
|
+
type PaginatedFolioPostCharges = Paginated<FolioPostCharge>;
|
|
1571
1621
|
|
|
1572
1622
|
/**
|
|
1573
1623
|
* Service for financial operations in the Atzentis Booking API.
|
|
@@ -1636,6 +1686,213 @@ declare class FinanceService extends BaseService {
|
|
|
1636
1686
|
getRevenueReport(params?: AccountingReportParams): Promise<AccountingRevenueReport>;
|
|
1637
1687
|
/** Get VAT accounting report */
|
|
1638
1688
|
getVatReport(params?: AccountingReportParams): Promise<AccountingVatReport>;
|
|
1689
|
+
/** Post a POS charge to a guest folio */
|
|
1690
|
+
folioPost(input: FolioPostInput): Promise<FolioPostResult>;
|
|
1691
|
+
/** List POS charges on a folio */
|
|
1692
|
+
listFolioPostCharges(folioId: string, params?: ListFolioPostParams): Promise<PaginatedFolioPostCharges>;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
/** Type of group booking */
|
|
1696
|
+
type GroupType = "wedding" | "conference" | "corporate" | "tour" | "other";
|
|
1697
|
+
/** Status of a group booking */
|
|
1698
|
+
type GroupStatus = "tentative" | "definite" | "cancelled";
|
|
1699
|
+
/** A single date entry in a block with room count and rate */
|
|
1700
|
+
interface BlockDate {
|
|
1701
|
+
date: string;
|
|
1702
|
+
count: number;
|
|
1703
|
+
rate: number;
|
|
1704
|
+
}
|
|
1705
|
+
/** Summary of block allocation for a group */
|
|
1706
|
+
interface GroupBlockSummary {
|
|
1707
|
+
totalRooms: number;
|
|
1708
|
+
pickedUp: number;
|
|
1709
|
+
remaining: number;
|
|
1710
|
+
}
|
|
1711
|
+
/** A room block within a group booking */
|
|
1712
|
+
interface Block {
|
|
1713
|
+
id: string;
|
|
1714
|
+
groupId: string;
|
|
1715
|
+
categoryId: string;
|
|
1716
|
+
dates: BlockDate[];
|
|
1717
|
+
totalRooms: number;
|
|
1718
|
+
pickedUp: number;
|
|
1719
|
+
remaining: number;
|
|
1720
|
+
notes: string | null;
|
|
1721
|
+
metadata: Record<string, unknown> | null;
|
|
1722
|
+
createdAt: string;
|
|
1723
|
+
updatedAt: string;
|
|
1724
|
+
}
|
|
1725
|
+
/** A group booking entity */
|
|
1726
|
+
interface Group {
|
|
1727
|
+
id: string;
|
|
1728
|
+
propertyId: string;
|
|
1729
|
+
name: string;
|
|
1730
|
+
type: GroupType;
|
|
1731
|
+
status: GroupStatus;
|
|
1732
|
+
contactName: string | null;
|
|
1733
|
+
contactEmail: string | null;
|
|
1734
|
+
contactPhone: string | null;
|
|
1735
|
+
checkIn: string | null;
|
|
1736
|
+
checkOut: string | null;
|
|
1737
|
+
cutoffDate: string | null;
|
|
1738
|
+
blockSummary: GroupBlockSummary;
|
|
1739
|
+
folioId: string | null;
|
|
1740
|
+
notes: string | null;
|
|
1741
|
+
metadata: Record<string, unknown> | null;
|
|
1742
|
+
createdAt: string;
|
|
1743
|
+
updatedAt: string;
|
|
1744
|
+
}
|
|
1745
|
+
/** Pickup data broken down by category */
|
|
1746
|
+
interface CategoryPickup {
|
|
1747
|
+
categoryId: string;
|
|
1748
|
+
categoryName: string;
|
|
1749
|
+
blocked: number;
|
|
1750
|
+
pickedUp: number;
|
|
1751
|
+
remaining: number;
|
|
1752
|
+
}
|
|
1753
|
+
/** Pickup data broken down by date */
|
|
1754
|
+
interface DatePickup {
|
|
1755
|
+
date: string;
|
|
1756
|
+
blocked: number;
|
|
1757
|
+
pickedUp: number;
|
|
1758
|
+
remaining: number;
|
|
1759
|
+
}
|
|
1760
|
+
/** Pickup tracking data for a group */
|
|
1761
|
+
interface Pickup {
|
|
1762
|
+
groupId: string;
|
|
1763
|
+
totalBlocked: number;
|
|
1764
|
+
totalPickedUp: number;
|
|
1765
|
+
totalRemaining: number;
|
|
1766
|
+
pickupPercent: number;
|
|
1767
|
+
byCategory: CategoryPickup[];
|
|
1768
|
+
byDate: DatePickup[];
|
|
1769
|
+
}
|
|
1770
|
+
/** Result of a block release operation */
|
|
1771
|
+
interface ReleaseResult {
|
|
1772
|
+
groupId: string;
|
|
1773
|
+
releasedCount: number;
|
|
1774
|
+
remainingBlocked: number;
|
|
1775
|
+
releasedAt: string;
|
|
1776
|
+
}
|
|
1777
|
+
/** Result of creating a group folio */
|
|
1778
|
+
interface GroupFolioResult {
|
|
1779
|
+
groupId: string;
|
|
1780
|
+
folioId: string;
|
|
1781
|
+
status: string;
|
|
1782
|
+
createdAt: string;
|
|
1783
|
+
}
|
|
1784
|
+
/** Input for creating a group booking */
|
|
1785
|
+
interface CreateGroupInput {
|
|
1786
|
+
propertyId: string;
|
|
1787
|
+
name: string;
|
|
1788
|
+
type?: GroupType;
|
|
1789
|
+
contactName?: string;
|
|
1790
|
+
contactEmail?: string;
|
|
1791
|
+
contactPhone?: string;
|
|
1792
|
+
checkIn?: string;
|
|
1793
|
+
checkOut?: string;
|
|
1794
|
+
cutoffDate?: string;
|
|
1795
|
+
notes?: string;
|
|
1796
|
+
metadata?: Record<string, unknown>;
|
|
1797
|
+
}
|
|
1798
|
+
/** Input for updating a group booking */
|
|
1799
|
+
interface UpdateGroupInput {
|
|
1800
|
+
name?: string;
|
|
1801
|
+
type?: GroupType;
|
|
1802
|
+
status?: GroupStatus;
|
|
1803
|
+
contactName?: string;
|
|
1804
|
+
contactEmail?: string;
|
|
1805
|
+
contactPhone?: string;
|
|
1806
|
+
checkIn?: string;
|
|
1807
|
+
checkOut?: string;
|
|
1808
|
+
cutoffDate?: string;
|
|
1809
|
+
notes?: string;
|
|
1810
|
+
metadata?: Record<string, unknown>;
|
|
1811
|
+
}
|
|
1812
|
+
/** Input for creating a room block */
|
|
1813
|
+
interface CreateBlockInput {
|
|
1814
|
+
categoryId: string;
|
|
1815
|
+
dates: BlockDate[];
|
|
1816
|
+
notes?: string;
|
|
1817
|
+
metadata?: Record<string, unknown>;
|
|
1818
|
+
}
|
|
1819
|
+
/** Input for releasing blocks */
|
|
1820
|
+
interface ReleaseBlocksInput {
|
|
1821
|
+
count?: number;
|
|
1822
|
+
categoryId?: string;
|
|
1823
|
+
notes?: string;
|
|
1824
|
+
}
|
|
1825
|
+
/** Input for creating a group folio */
|
|
1826
|
+
interface CreateGroupFolioInput {
|
|
1827
|
+
billingName?: string;
|
|
1828
|
+
billingAddress?: string;
|
|
1829
|
+
notes?: string;
|
|
1830
|
+
}
|
|
1831
|
+
/** Parameters for listing groups */
|
|
1832
|
+
interface ListGroupsParams {
|
|
1833
|
+
propertyId: string;
|
|
1834
|
+
status?: GroupStatus | GroupStatus[];
|
|
1835
|
+
type?: GroupType | GroupType[];
|
|
1836
|
+
search?: string;
|
|
1837
|
+
limit?: number;
|
|
1838
|
+
cursor?: string;
|
|
1839
|
+
}
|
|
1840
|
+
/** Paginated list of groups */
|
|
1841
|
+
type PaginatedGroups = Paginated<Group>;
|
|
1842
|
+
|
|
1843
|
+
/**
|
|
1844
|
+
* Service for group booking operations in the Atzentis Booking API.
|
|
1845
|
+
*
|
|
1846
|
+
* Provides group CRUD, room block management, pickup tracking,
|
|
1847
|
+
* block release operations, and group folio creation.
|
|
1848
|
+
*
|
|
1849
|
+
* @example
|
|
1850
|
+
* ```typescript
|
|
1851
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
1852
|
+
*
|
|
1853
|
+
* // Create a conference group
|
|
1854
|
+
* const group = await booking.groups.create({
|
|
1855
|
+
* propertyId: "prop_abc123",
|
|
1856
|
+
* name: "Tech Conference 2025",
|
|
1857
|
+
* type: "conference",
|
|
1858
|
+
* });
|
|
1859
|
+
*
|
|
1860
|
+
* // Add a room block
|
|
1861
|
+
* const block = await booking.groups.createBlock(group.id, {
|
|
1862
|
+
* categoryId: "cat_std",
|
|
1863
|
+
* dates: [
|
|
1864
|
+
* { date: "2025-09-15", count: 20, rate: 12000 },
|
|
1865
|
+
* { date: "2025-09-16", count: 20, rate: 12000 },
|
|
1866
|
+
* ],
|
|
1867
|
+
* });
|
|
1868
|
+
*
|
|
1869
|
+
* // Track pickup and release remaining
|
|
1870
|
+
* const pickup = await booking.groups.getPickup(group.id);
|
|
1871
|
+
* await booking.groups.release(group.id, { count: 5 });
|
|
1872
|
+
* ```
|
|
1873
|
+
*/
|
|
1874
|
+
declare class GroupsService extends BaseService {
|
|
1875
|
+
protected readonly basePath = "/booking/v1/groups";
|
|
1876
|
+
/** Create a group booking */
|
|
1877
|
+
create(input: CreateGroupInput): Promise<Group>;
|
|
1878
|
+
/** Get a group booking by ID */
|
|
1879
|
+
get(groupId: string): Promise<Group>;
|
|
1880
|
+
/** List group bookings with filters */
|
|
1881
|
+
list(params: ListGroupsParams): Promise<PaginatedGroups>;
|
|
1882
|
+
/** Update a group booking */
|
|
1883
|
+
update(groupId: string, input: UpdateGroupInput): Promise<Group>;
|
|
1884
|
+
/** Delete a group booking */
|
|
1885
|
+
delete(groupId: string): Promise<void>;
|
|
1886
|
+
/** Create a room block for a group */
|
|
1887
|
+
createBlock(groupId: string, input: CreateBlockInput): Promise<Block>;
|
|
1888
|
+
/** List blocks for a group */
|
|
1889
|
+
listBlocks(groupId: string): Promise<Block[]>;
|
|
1890
|
+
/** Get pickup tracking data for a group */
|
|
1891
|
+
getPickup(groupId: string): Promise<Pickup>;
|
|
1892
|
+
/** Release blocks back to inventory */
|
|
1893
|
+
release(groupId: string, input?: ReleaseBlocksInput): Promise<ReleaseResult>;
|
|
1894
|
+
/** Create a master folio for a group */
|
|
1895
|
+
createFolio(groupId: string, input?: CreateGroupFolioInput): Promise<GroupFolioResult>;
|
|
1639
1896
|
}
|
|
1640
1897
|
|
|
1641
1898
|
/** Guest address */
|
|
@@ -2213,6 +2470,281 @@ declare class GuestsService extends BaseService {
|
|
|
2213
2470
|
private _buildHistoryQuery;
|
|
2214
2471
|
}
|
|
2215
2472
|
|
|
2473
|
+
/** Housekeeping status of a space */
|
|
2474
|
+
type HousekeepingStatus = "dirty" | "clean" | "inspected" | "out_of_order" | "out_of_service";
|
|
2475
|
+
/** Occupancy status of a space */
|
|
2476
|
+
type OccupancyStatus = "vacant" | "occupied" | "due_out" | "due_in";
|
|
2477
|
+
/** Priority level for housekeeping tasks */
|
|
2478
|
+
type HousekeepingPriority = "normal" | "rush" | "vip";
|
|
2479
|
+
/** A single entry on the housekeeping board */
|
|
2480
|
+
interface HousekeepingBoardEntry {
|
|
2481
|
+
spaceId: string;
|
|
2482
|
+
spaceName: string;
|
|
2483
|
+
spaceType: string;
|
|
2484
|
+
floor: number;
|
|
2485
|
+
status: HousekeepingStatus;
|
|
2486
|
+
occupancyStatus: OccupancyStatus;
|
|
2487
|
+
priority: HousekeepingPriority;
|
|
2488
|
+
assignedTo: string | null;
|
|
2489
|
+
notes: string | null;
|
|
2490
|
+
lastStatusChange: string;
|
|
2491
|
+
}
|
|
2492
|
+
/** The housekeeping board for a property */
|
|
2493
|
+
interface HousekeepingBoard {
|
|
2494
|
+
spaces: HousekeepingBoardEntry[];
|
|
2495
|
+
propertyId: string;
|
|
2496
|
+
updatedAt: string;
|
|
2497
|
+
}
|
|
2498
|
+
/** Parameters for retrieving the housekeeping board */
|
|
2499
|
+
interface GetBoardParams {
|
|
2500
|
+
propertyId?: string;
|
|
2501
|
+
floor?: number;
|
|
2502
|
+
status?: HousekeepingStatus;
|
|
2503
|
+
assignedTo?: string;
|
|
2504
|
+
}
|
|
2505
|
+
/** Input for updating a space's housekeeping status */
|
|
2506
|
+
interface UpdateSpaceStatusInput {
|
|
2507
|
+
status: HousekeepingStatus;
|
|
2508
|
+
notes?: string;
|
|
2509
|
+
assignedTo?: string;
|
|
2510
|
+
priority?: HousekeepingPriority;
|
|
2511
|
+
}
|
|
2512
|
+
/** Type of housekeeping task */
|
|
2513
|
+
type HousekeepingTaskType = "cleaning" | "deep_cleaning" | "turnover" | "inspection" | "maintenance" | "other";
|
|
2514
|
+
/** Status of a housekeeping task */
|
|
2515
|
+
type HousekeepingTaskStatus = "pending" | "in_progress" | "completed" | "cancelled";
|
|
2516
|
+
/** A housekeeping task assigned to a space */
|
|
2517
|
+
interface HousekeepingTask {
|
|
2518
|
+
id: string;
|
|
2519
|
+
spaceId: string;
|
|
2520
|
+
type: HousekeepingTaskType;
|
|
2521
|
+
status: HousekeepingTaskStatus;
|
|
2522
|
+
description: string | null;
|
|
2523
|
+
assignedTo: string | null;
|
|
2524
|
+
priority: HousekeepingPriority;
|
|
2525
|
+
dueAt: string | null;
|
|
2526
|
+
notes: string | null;
|
|
2527
|
+
metadata: Record<string, unknown> | null;
|
|
2528
|
+
createdAt: string;
|
|
2529
|
+
updatedAt: string;
|
|
2530
|
+
completedAt: string | null;
|
|
2531
|
+
}
|
|
2532
|
+
/** Input for creating a housekeeping task */
|
|
2533
|
+
interface CreateHousekeepingTaskInput {
|
|
2534
|
+
spaceId: string;
|
|
2535
|
+
type: HousekeepingTaskType;
|
|
2536
|
+
description?: string;
|
|
2537
|
+
assignedTo?: string;
|
|
2538
|
+
priority?: HousekeepingPriority;
|
|
2539
|
+
dueAt?: string;
|
|
2540
|
+
metadata?: Record<string, unknown>;
|
|
2541
|
+
}
|
|
2542
|
+
/** Input for updating a housekeeping task */
|
|
2543
|
+
interface UpdateHousekeepingTaskInput {
|
|
2544
|
+
status?: HousekeepingTaskStatus;
|
|
2545
|
+
description?: string;
|
|
2546
|
+
assignedTo?: string;
|
|
2547
|
+
priority?: HousekeepingPriority;
|
|
2548
|
+
dueAt?: string;
|
|
2549
|
+
notes?: string;
|
|
2550
|
+
metadata?: Record<string, unknown>;
|
|
2551
|
+
}
|
|
2552
|
+
/** Parameters for listing housekeeping tasks */
|
|
2553
|
+
interface ListHousekeepingTasksParams {
|
|
2554
|
+
spaceId?: string;
|
|
2555
|
+
status?: HousekeepingTaskStatus;
|
|
2556
|
+
type?: HousekeepingTaskType;
|
|
2557
|
+
assignedTo?: string;
|
|
2558
|
+
priority?: HousekeepingPriority;
|
|
2559
|
+
limit?: number;
|
|
2560
|
+
cursor?: string;
|
|
2561
|
+
}
|
|
2562
|
+
/** Paginated list of housekeeping tasks */
|
|
2563
|
+
type PaginatedHousekeepingTasks = Paginated<HousekeepingTask>;
|
|
2564
|
+
/** Status of a night audit run */
|
|
2565
|
+
type NightAuditStatus = "pending" | "in_progress" | "completed" | "failed";
|
|
2566
|
+
/** Summary statistics from a night audit run */
|
|
2567
|
+
interface NightAuditSummary {
|
|
2568
|
+
totalChargesPosted: number;
|
|
2569
|
+
totalPaymentsReconciled: number;
|
|
2570
|
+
totalRevenue: number;
|
|
2571
|
+
currency: string;
|
|
2572
|
+
discrepancyCount: number;
|
|
2573
|
+
}
|
|
2574
|
+
/** An error that occurred during a night audit run */
|
|
2575
|
+
interface NightAuditError {
|
|
2576
|
+
code: string;
|
|
2577
|
+
message: string;
|
|
2578
|
+
details: Record<string, unknown> | null;
|
|
2579
|
+
}
|
|
2580
|
+
/** A night audit run record */
|
|
2581
|
+
interface NightAuditRun {
|
|
2582
|
+
id: string;
|
|
2583
|
+
propertyId: string;
|
|
2584
|
+
businessDate: string;
|
|
2585
|
+
status: NightAuditStatus;
|
|
2586
|
+
summary: NightAuditSummary | null;
|
|
2587
|
+
startedAt: string;
|
|
2588
|
+
completedAt: string | null;
|
|
2589
|
+
notes: string | null;
|
|
2590
|
+
errors: NightAuditError[];
|
|
2591
|
+
dryRun: boolean;
|
|
2592
|
+
createdAt: string;
|
|
2593
|
+
}
|
|
2594
|
+
/** Input for running a night audit */
|
|
2595
|
+
interface RunNightAuditInput {
|
|
2596
|
+
propertyId: string;
|
|
2597
|
+
businessDate?: string;
|
|
2598
|
+
dryRun?: boolean;
|
|
2599
|
+
notes?: string;
|
|
2600
|
+
}
|
|
2601
|
+
/** Parameters for retrieving night audit history */
|
|
2602
|
+
interface GetNightAuditHistoryParams {
|
|
2603
|
+
propertyId?: string;
|
|
2604
|
+
status?: NightAuditStatus;
|
|
2605
|
+
fromDate?: string;
|
|
2606
|
+
toDate?: string;
|
|
2607
|
+
limit?: number;
|
|
2608
|
+
cursor?: string;
|
|
2609
|
+
}
|
|
2610
|
+
/** Paginated list of night audit runs */
|
|
2611
|
+
type PaginatedNightAuditRuns = Paginated<NightAuditRun>;
|
|
2612
|
+
/** Revenue breakdown by category */
|
|
2613
|
+
interface NightAuditRevenueBreakdown {
|
|
2614
|
+
category: string;
|
|
2615
|
+
amount: number;
|
|
2616
|
+
count: number;
|
|
2617
|
+
}
|
|
2618
|
+
/** Revenue section of a night audit report */
|
|
2619
|
+
interface NightAuditRevenue {
|
|
2620
|
+
totalRevenue: number;
|
|
2621
|
+
roomRevenue: number;
|
|
2622
|
+
fbRevenue: number;
|
|
2623
|
+
otherRevenue: number;
|
|
2624
|
+
currency: string;
|
|
2625
|
+
breakdown: NightAuditRevenueBreakdown[];
|
|
2626
|
+
}
|
|
2627
|
+
/** Occupancy statistics from a night audit */
|
|
2628
|
+
interface NightAuditOccupancy {
|
|
2629
|
+
totalSpaces: number;
|
|
2630
|
+
occupiedSpaces: number;
|
|
2631
|
+
occupancyRate: number;
|
|
2632
|
+
arrivals: number;
|
|
2633
|
+
departures: number;
|
|
2634
|
+
stayovers: number;
|
|
2635
|
+
noShows: number;
|
|
2636
|
+
}
|
|
2637
|
+
/** Payment method breakdown */
|
|
2638
|
+
interface NightAuditPaymentMethod {
|
|
2639
|
+
method: string;
|
|
2640
|
+
amount: number;
|
|
2641
|
+
count: number;
|
|
2642
|
+
}
|
|
2643
|
+
/** Payments section of a night audit report */
|
|
2644
|
+
interface NightAuditPayments {
|
|
2645
|
+
totalCollected: number;
|
|
2646
|
+
totalPending: number;
|
|
2647
|
+
totalRefunded: number;
|
|
2648
|
+
currency: string;
|
|
2649
|
+
byMethod: NightAuditPaymentMethod[];
|
|
2650
|
+
}
|
|
2651
|
+
/** A discrepancy found during night audit */
|
|
2652
|
+
interface NightAuditDiscrepancy {
|
|
2653
|
+
description: string;
|
|
2654
|
+
amount: number;
|
|
2655
|
+
currency: string;
|
|
2656
|
+
relatedId: string | null;
|
|
2657
|
+
relatedType: string | null;
|
|
2658
|
+
}
|
|
2659
|
+
/** Full night audit report with revenue, occupancy, payments, and discrepancies */
|
|
2660
|
+
interface NightAuditReport {
|
|
2661
|
+
auditId: string;
|
|
2662
|
+
propertyId: string;
|
|
2663
|
+
businessDate: string;
|
|
2664
|
+
revenue: NightAuditRevenue;
|
|
2665
|
+
occupancy: NightAuditOccupancy;
|
|
2666
|
+
payments: NightAuditPayments;
|
|
2667
|
+
discrepancies: NightAuditDiscrepancy[];
|
|
2668
|
+
generatedAt: string;
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
/**
|
|
2672
|
+
* Service for housekeeping operations in the Atzentis Booking API.
|
|
2673
|
+
*
|
|
2674
|
+
* Provides board retrieval with filtering, space status updates,
|
|
2675
|
+
* and housekeeping task CRUD with assignment and priority tracking.
|
|
2676
|
+
*
|
|
2677
|
+
* @example
|
|
2678
|
+
* ```typescript
|
|
2679
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2680
|
+
*
|
|
2681
|
+
* // Get the housekeeping board for floor 2
|
|
2682
|
+
* const board = await booking.housekeeping.getBoard({ floor: 2 });
|
|
2683
|
+
*
|
|
2684
|
+
* // Mark a space as clean
|
|
2685
|
+
* await booking.housekeeping.updateSpaceStatus("space_1", {
|
|
2686
|
+
* status: "clean",
|
|
2687
|
+
* notes: "Deep cleaned",
|
|
2688
|
+
* });
|
|
2689
|
+
*
|
|
2690
|
+
* // Create a cleaning task
|
|
2691
|
+
* await booking.housekeeping.createTask({
|
|
2692
|
+
* spaceId: "space_1",
|
|
2693
|
+
* type: "turnover",
|
|
2694
|
+
* priority: "rush",
|
|
2695
|
+
* });
|
|
2696
|
+
* ```
|
|
2697
|
+
*/
|
|
2698
|
+
declare class HousekeepingService extends BaseService {
|
|
2699
|
+
protected readonly basePath = "/operations/v1/housekeeping";
|
|
2700
|
+
/** Get the housekeeping board with optional filters */
|
|
2701
|
+
getBoard(params?: GetBoardParams): Promise<HousekeepingBoard>;
|
|
2702
|
+
/** Update the housekeeping status of a space */
|
|
2703
|
+
updateSpaceStatus(spaceId: string, input: UpdateSpaceStatusInput): Promise<HousekeepingBoardEntry>;
|
|
2704
|
+
/** Create a housekeeping task */
|
|
2705
|
+
createTask(input: CreateHousekeepingTaskInput): Promise<HousekeepingTask>;
|
|
2706
|
+
/** List housekeeping tasks with optional filters */
|
|
2707
|
+
listTasks(params?: ListHousekeepingTasksParams): Promise<PaginatedHousekeepingTasks>;
|
|
2708
|
+
/** Update a housekeeping task */
|
|
2709
|
+
updateTask(taskId: string, input: UpdateHousekeepingTaskInput): Promise<HousekeepingTask>;
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
/**
|
|
2713
|
+
* Service for night audit operations in the Atzentis Booking API.
|
|
2714
|
+
*
|
|
2715
|
+
* Supports running night audits (with optional dry-run mode),
|
|
2716
|
+
* retrieving audit history, and generating detailed reports with
|
|
2717
|
+
* revenue, occupancy, payment, and discrepancy breakdowns.
|
|
2718
|
+
*
|
|
2719
|
+
* @example
|
|
2720
|
+
* ```typescript
|
|
2721
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
2722
|
+
*
|
|
2723
|
+
* // Run a night audit
|
|
2724
|
+
* const audit = await booking.nightAudit.run({
|
|
2725
|
+
* propertyId: "prop_abc123",
|
|
2726
|
+
* });
|
|
2727
|
+
*
|
|
2728
|
+
* // Dry-run to preview without committing
|
|
2729
|
+
* const preview = await booking.nightAudit.run({
|
|
2730
|
+
* propertyId: "prop_abc123",
|
|
2731
|
+
* dryRun: true,
|
|
2732
|
+
* });
|
|
2733
|
+
*
|
|
2734
|
+
* // Get the detailed report
|
|
2735
|
+
* const report = await booking.nightAudit.getReport(audit.id);
|
|
2736
|
+
* ```
|
|
2737
|
+
*/
|
|
2738
|
+
declare class NightAuditService extends BaseService {
|
|
2739
|
+
protected readonly basePath = "/operations/v1/night-audit";
|
|
2740
|
+
/** Run a night audit for a property */
|
|
2741
|
+
run(input: RunNightAuditInput): Promise<NightAuditRun>;
|
|
2742
|
+
/** Get night audit history with optional filters */
|
|
2743
|
+
getHistory(params?: GetNightAuditHistoryParams): Promise<PaginatedNightAuditRuns>;
|
|
2744
|
+
/** Get the detailed report for a completed night audit */
|
|
2745
|
+
getReport(auditId: string): Promise<NightAuditReport>;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2216
2748
|
/** Supported payment providers */
|
|
2217
2749
|
type PaymentProvider = "stripe" | "viva_wallet";
|
|
2218
2750
|
/** Status of a payment */
|
|
@@ -2536,6 +3068,273 @@ declare class PropertiesService extends BaseService {
|
|
|
2536
3068
|
delete(propertyId: string): Promise<void>;
|
|
2537
3069
|
}
|
|
2538
3070
|
|
|
3071
|
+
/** Status of a rate plan */
|
|
3072
|
+
type RatePlanStatus = "active" | "inactive";
|
|
3073
|
+
/** A rate plan entity */
|
|
3074
|
+
interface RatePlan {
|
|
3075
|
+
id: string;
|
|
3076
|
+
propertyId: string;
|
|
3077
|
+
categoryId: string;
|
|
3078
|
+
name: string;
|
|
3079
|
+
description: string | null;
|
|
3080
|
+
status: RatePlanStatus;
|
|
3081
|
+
baseRate: number;
|
|
3082
|
+
currency: string;
|
|
3083
|
+
taxInclusive: boolean;
|
|
3084
|
+
metadata: Record<string, unknown> | null;
|
|
3085
|
+
createdAt: string;
|
|
3086
|
+
updatedAt: string;
|
|
3087
|
+
}
|
|
3088
|
+
/** Input for creating a rate plan */
|
|
3089
|
+
interface CreateRatePlanInput {
|
|
3090
|
+
propertyId: string;
|
|
3091
|
+
categoryId: string;
|
|
3092
|
+
name: string;
|
|
3093
|
+
baseRate: number;
|
|
3094
|
+
description?: string;
|
|
3095
|
+
currency?: string;
|
|
3096
|
+
taxInclusive?: boolean;
|
|
3097
|
+
metadata?: Record<string, unknown>;
|
|
3098
|
+
}
|
|
3099
|
+
/** Input for updating a rate plan */
|
|
3100
|
+
interface UpdateRatePlanInput {
|
|
3101
|
+
name?: string;
|
|
3102
|
+
description?: string;
|
|
3103
|
+
baseRate?: number;
|
|
3104
|
+
status?: RatePlanStatus;
|
|
3105
|
+
currency?: string;
|
|
3106
|
+
taxInclusive?: boolean;
|
|
3107
|
+
metadata?: Record<string, unknown>;
|
|
3108
|
+
}
|
|
3109
|
+
/** Parameters for listing rate plans */
|
|
3110
|
+
interface ListRatePlansParams {
|
|
3111
|
+
propertyId?: string;
|
|
3112
|
+
categoryId?: string;
|
|
3113
|
+
status?: RatePlanStatus;
|
|
3114
|
+
limit?: number;
|
|
3115
|
+
cursor?: string;
|
|
3116
|
+
}
|
|
3117
|
+
/** Paginated list of rate plans */
|
|
3118
|
+
type PaginatedRatePlans = Paginated<RatePlan>;
|
|
3119
|
+
/** A rate period with seasonal pricing */
|
|
3120
|
+
interface RatePeriod {
|
|
3121
|
+
id: string;
|
|
3122
|
+
planId: string;
|
|
3123
|
+
name: string;
|
|
3124
|
+
startDate: string;
|
|
3125
|
+
endDate: string;
|
|
3126
|
+
rate: number;
|
|
3127
|
+
adjustmentPercent: number | null;
|
|
3128
|
+
adjustmentAmount: number | null;
|
|
3129
|
+
minStay: number | null;
|
|
3130
|
+
metadata: Record<string, unknown> | null;
|
|
3131
|
+
createdAt: string;
|
|
3132
|
+
updatedAt: string;
|
|
3133
|
+
}
|
|
3134
|
+
/** Input for creating a rate period */
|
|
3135
|
+
interface CreateRatePeriodInput {
|
|
3136
|
+
name: string;
|
|
3137
|
+
startDate: string;
|
|
3138
|
+
endDate: string;
|
|
3139
|
+
rate: number;
|
|
3140
|
+
adjustmentPercent?: number;
|
|
3141
|
+
adjustmentAmount?: number;
|
|
3142
|
+
minStay?: number;
|
|
3143
|
+
metadata?: Record<string, unknown>;
|
|
3144
|
+
}
|
|
3145
|
+
/** Input for updating a rate period */
|
|
3146
|
+
interface UpdateRatePeriodInput {
|
|
3147
|
+
name?: string;
|
|
3148
|
+
startDate?: string;
|
|
3149
|
+
endDate?: string;
|
|
3150
|
+
rate?: number;
|
|
3151
|
+
adjustmentPercent?: number | null;
|
|
3152
|
+
adjustmentAmount?: number | null;
|
|
3153
|
+
minStay?: number | null;
|
|
3154
|
+
metadata?: Record<string, unknown>;
|
|
3155
|
+
}
|
|
3156
|
+
/** Parameters for listing rate periods */
|
|
3157
|
+
interface ListRatePeriodsParams {
|
|
3158
|
+
fromDate?: string;
|
|
3159
|
+
toDate?: string;
|
|
3160
|
+
limit?: number;
|
|
3161
|
+
cursor?: string;
|
|
3162
|
+
}
|
|
3163
|
+
/** Paginated list of rate periods */
|
|
3164
|
+
type PaginatedRatePeriods = Paginated<RatePeriod>;
|
|
3165
|
+
/** Booking restrictions on a rate plan */
|
|
3166
|
+
interface RateRestriction {
|
|
3167
|
+
planId: string;
|
|
3168
|
+
minStay: number | null;
|
|
3169
|
+
maxStay: number | null;
|
|
3170
|
+
closedToArrival: boolean;
|
|
3171
|
+
closedToDeparture: boolean;
|
|
3172
|
+
closeOutDates: string[];
|
|
3173
|
+
advanceBookingMin: number | null;
|
|
3174
|
+
advanceBookingMax: number | null;
|
|
3175
|
+
updatedAt: string;
|
|
3176
|
+
}
|
|
3177
|
+
/** Input for updating rate restrictions */
|
|
3178
|
+
interface UpdateRateRestrictionInput {
|
|
3179
|
+
minStay?: number | null;
|
|
3180
|
+
maxStay?: number | null;
|
|
3181
|
+
closedToArrival?: boolean;
|
|
3182
|
+
closedToDeparture?: boolean;
|
|
3183
|
+
closeOutDates?: string[];
|
|
3184
|
+
advanceBookingMin?: number | null;
|
|
3185
|
+
advanceBookingMax?: number | null;
|
|
3186
|
+
}
|
|
3187
|
+
/** Input for calculating a rate */
|
|
3188
|
+
interface CalculateRateInput {
|
|
3189
|
+
propertyId: string;
|
|
3190
|
+
categoryId: string;
|
|
3191
|
+
checkIn: string;
|
|
3192
|
+
checkOut: string;
|
|
3193
|
+
planId?: string;
|
|
3194
|
+
guests?: number;
|
|
3195
|
+
promoCode?: string;
|
|
3196
|
+
}
|
|
3197
|
+
/** A modifier applied to a nightly rate */
|
|
3198
|
+
interface RateModifier {
|
|
3199
|
+
name: string;
|
|
3200
|
+
type: "percent" | "fixed";
|
|
3201
|
+
value: number;
|
|
3202
|
+
}
|
|
3203
|
+
/** Nightly rate breakdown */
|
|
3204
|
+
interface NightlyRate {
|
|
3205
|
+
date: string;
|
|
3206
|
+
baseRate: number;
|
|
3207
|
+
finalRate: number;
|
|
3208
|
+
modifiers: RateModifier[];
|
|
3209
|
+
}
|
|
3210
|
+
/** An applied restriction with its status */
|
|
3211
|
+
interface AppliedRestriction {
|
|
3212
|
+
type: string;
|
|
3213
|
+
value: string | number | boolean;
|
|
3214
|
+
passed: boolean;
|
|
3215
|
+
message: string | null;
|
|
3216
|
+
}
|
|
3217
|
+
/** Result of a rate calculation */
|
|
3218
|
+
interface RateCalculation {
|
|
3219
|
+
planId: string;
|
|
3220
|
+
planName: string;
|
|
3221
|
+
totalAmount: number;
|
|
3222
|
+
currency: string;
|
|
3223
|
+
nights: number;
|
|
3224
|
+
averageNightlyRate: number;
|
|
3225
|
+
nightlyBreakdown: NightlyRate[];
|
|
3226
|
+
restrictions: AppliedRestriction[];
|
|
3227
|
+
taxAmount: number | null;
|
|
3228
|
+
taxInclusive: boolean;
|
|
3229
|
+
}
|
|
3230
|
+
/** Input for pushing rates to a portfolio */
|
|
3231
|
+
interface PushPortfolioRatesInput {
|
|
3232
|
+
sourcePlanId: string;
|
|
3233
|
+
targetPropertyIds: string[];
|
|
3234
|
+
adjustmentPercent?: number;
|
|
3235
|
+
adjustmentAmount?: number;
|
|
3236
|
+
periodIds?: string[];
|
|
3237
|
+
}
|
|
3238
|
+
/** Result for a single portfolio target property */
|
|
3239
|
+
interface PortfolioTargetResult {
|
|
3240
|
+
propertyId: string;
|
|
3241
|
+
success: boolean;
|
|
3242
|
+
planId: string | null;
|
|
3243
|
+
error: string | null;
|
|
3244
|
+
}
|
|
3245
|
+
/** Result of a portfolio rate push operation */
|
|
3246
|
+
interface PortfolioRatePushResult {
|
|
3247
|
+
sourcePlanId: string;
|
|
3248
|
+
results: PortfolioTargetResult[];
|
|
3249
|
+
totalPushed: number;
|
|
3250
|
+
totalFailed: number;
|
|
3251
|
+
}
|
|
3252
|
+
/** Input for comparing portfolio rates */
|
|
3253
|
+
interface ComparePortfolioRatesInput {
|
|
3254
|
+
portfolioId: string;
|
|
3255
|
+
categoryId: string;
|
|
3256
|
+
checkIn: string;
|
|
3257
|
+
checkOut: string;
|
|
3258
|
+
}
|
|
3259
|
+
/** Rate data for a single property in a portfolio comparison */
|
|
3260
|
+
interface PortfolioPropertyRate {
|
|
3261
|
+
propertyId: string;
|
|
3262
|
+
propertyName: string;
|
|
3263
|
+
planId: string;
|
|
3264
|
+
planName: string;
|
|
3265
|
+
totalAmount: number;
|
|
3266
|
+
averageNightlyRate: number;
|
|
3267
|
+
currency: string;
|
|
3268
|
+
}
|
|
3269
|
+
/** Result of a portfolio rate comparison */
|
|
3270
|
+
interface PortfolioRateComparison {
|
|
3271
|
+
portfolioId: string;
|
|
3272
|
+
categoryId: string;
|
|
3273
|
+
checkIn: string;
|
|
3274
|
+
checkOut: string;
|
|
3275
|
+
properties: PortfolioPropertyRate[];
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
/**
|
|
3279
|
+
* Service for rate plan management in the Atzentis Booking API.
|
|
3280
|
+
*
|
|
3281
|
+
* Provides rate plan CRUD, rate period management with seasonal pricing,
|
|
3282
|
+
* restriction configuration, dynamic price calculation with nightly breakdown,
|
|
3283
|
+
* and portfolio-wide rate push and comparison.
|
|
3284
|
+
*
|
|
3285
|
+
* @example
|
|
3286
|
+
* ```typescript
|
|
3287
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
3288
|
+
*
|
|
3289
|
+
* // Create a rate plan
|
|
3290
|
+
* const plan = await booking.ratePlans.create({
|
|
3291
|
+
* propertyId: "prop_abc123",
|
|
3292
|
+
* categoryId: "cat_std",
|
|
3293
|
+
* name: "Standard Rate",
|
|
3294
|
+
* baseRate: 15000,
|
|
3295
|
+
* });
|
|
3296
|
+
*
|
|
3297
|
+
* // Calculate price for a stay
|
|
3298
|
+
* const price = await booking.ratePlans.calculate({
|
|
3299
|
+
* propertyId: "prop_abc123",
|
|
3300
|
+
* categoryId: "cat_std",
|
|
3301
|
+
* checkIn: "2025-07-01",
|
|
3302
|
+
* checkOut: "2025-07-05",
|
|
3303
|
+
* });
|
|
3304
|
+
* ```
|
|
3305
|
+
*/
|
|
3306
|
+
declare class RatePlansService extends BaseService {
|
|
3307
|
+
protected readonly basePath = "/rate/v1";
|
|
3308
|
+
/** List rate plans with optional filters */
|
|
3309
|
+
list(params?: ListRatePlansParams): Promise<PaginatedRatePlans>;
|
|
3310
|
+
/** Get a rate plan by ID */
|
|
3311
|
+
get(planId: string): Promise<RatePlan>;
|
|
3312
|
+
/** Create a new rate plan */
|
|
3313
|
+
create(input: CreateRatePlanInput): Promise<RatePlan>;
|
|
3314
|
+
/** Update a rate plan */
|
|
3315
|
+
update(planId: string, input: UpdateRatePlanInput): Promise<RatePlan>;
|
|
3316
|
+
/** Delete a rate plan */
|
|
3317
|
+
delete(planId: string): Promise<void>;
|
|
3318
|
+
/** List rate periods for a plan */
|
|
3319
|
+
listPeriods(planId: string, params?: ListRatePeriodsParams): Promise<PaginatedRatePeriods>;
|
|
3320
|
+
/** Get a rate period by ID */
|
|
3321
|
+
getPeriod(planId: string, periodId: string): Promise<RatePeriod>;
|
|
3322
|
+
/** Create a rate period */
|
|
3323
|
+
createPeriod(planId: string, input: CreateRatePeriodInput): Promise<RatePeriod>;
|
|
3324
|
+
/** Update a rate period */
|
|
3325
|
+
updatePeriod(planId: string, periodId: string, input: UpdateRatePeriodInput): Promise<RatePeriod>;
|
|
3326
|
+
/** Get restrictions for a rate plan */
|
|
3327
|
+
getRestrictions(planId: string): Promise<RateRestriction>;
|
|
3328
|
+
/** Update restrictions for a rate plan */
|
|
3329
|
+
updateRestrictions(planId: string, input: UpdateRateRestrictionInput): Promise<RateRestriction>;
|
|
3330
|
+
/** Calculate price for a stay */
|
|
3331
|
+
calculate(input: CalculateRateInput): Promise<RateCalculation>;
|
|
3332
|
+
/** Push rates to portfolio properties */
|
|
3333
|
+
pushToPortfolio(input: PushPortfolioRatesInput): Promise<PortfolioRatePushResult>;
|
|
3334
|
+
/** Compare rates across portfolio properties */
|
|
3335
|
+
comparePortfolioRates(input: ComparePortfolioRatesInput): Promise<PortfolioRateComparison>;
|
|
3336
|
+
}
|
|
3337
|
+
|
|
2539
3338
|
/**
|
|
2540
3339
|
* Service for managing bookable spaces in the Atzentis Booking API.
|
|
2541
3340
|
*
|
|
@@ -2665,6 +3464,154 @@ declare class SpacesService extends BaseService {
|
|
|
2665
3464
|
linkPosTable(spaceId: string, input: LinkPosTableInput): Promise<Space>;
|
|
2666
3465
|
}
|
|
2667
3466
|
|
|
3467
|
+
/** Department a staff member belongs to */
|
|
3468
|
+
type StaffDepartment = "front_desk" | "housekeeping" | "maintenance" | "food_beverage" | "management" | "spa" | "security" | "other";
|
|
3469
|
+
/** Role of a staff member */
|
|
3470
|
+
type StaffRole = "manager" | "supervisor" | "staff" | "intern" | "contractor";
|
|
3471
|
+
/** Employment status of a staff member */
|
|
3472
|
+
type StaffStatus = "active" | "inactive" | "on_leave";
|
|
3473
|
+
/** Type of shift */
|
|
3474
|
+
type ShiftType = "morning" | "afternoon" | "evening" | "night" | "custom";
|
|
3475
|
+
/** A staff member entity */
|
|
3476
|
+
interface Staff {
|
|
3477
|
+
id: string;
|
|
3478
|
+
propertyId: string;
|
|
3479
|
+
firstName: string;
|
|
3480
|
+
lastName: string;
|
|
3481
|
+
email: string | null;
|
|
3482
|
+
phone: string | null;
|
|
3483
|
+
department: StaffDepartment;
|
|
3484
|
+
role: StaffRole;
|
|
3485
|
+
status: StaffStatus;
|
|
3486
|
+
hireDate: string | null;
|
|
3487
|
+
notes: string | null;
|
|
3488
|
+
metadata: Record<string, unknown> | null;
|
|
3489
|
+
createdAt: string;
|
|
3490
|
+
updatedAt: string;
|
|
3491
|
+
}
|
|
3492
|
+
/** A staff shift record */
|
|
3493
|
+
interface StaffShift {
|
|
3494
|
+
id: string;
|
|
3495
|
+
staffId: string;
|
|
3496
|
+
propertyId: string;
|
|
3497
|
+
shiftType: ShiftType;
|
|
3498
|
+
startTime: string | null;
|
|
3499
|
+
endTime: string | null;
|
|
3500
|
+
date: string;
|
|
3501
|
+
notes: string | null;
|
|
3502
|
+
metadata: Record<string, unknown> | null;
|
|
3503
|
+
createdAt: string;
|
|
3504
|
+
updatedAt: string;
|
|
3505
|
+
}
|
|
3506
|
+
/** Input for creating a staff member */
|
|
3507
|
+
interface CreateStaffInput {
|
|
3508
|
+
propertyId: string;
|
|
3509
|
+
firstName: string;
|
|
3510
|
+
lastName: string;
|
|
3511
|
+
email?: string;
|
|
3512
|
+
phone?: string;
|
|
3513
|
+
department?: StaffDepartment;
|
|
3514
|
+
role?: StaffRole;
|
|
3515
|
+
status?: StaffStatus;
|
|
3516
|
+
hireDate?: string;
|
|
3517
|
+
notes?: string;
|
|
3518
|
+
metadata?: Record<string, unknown>;
|
|
3519
|
+
}
|
|
3520
|
+
/** Input for updating a staff member */
|
|
3521
|
+
interface UpdateStaffInput {
|
|
3522
|
+
firstName?: string;
|
|
3523
|
+
lastName?: string;
|
|
3524
|
+
email?: string;
|
|
3525
|
+
phone?: string;
|
|
3526
|
+
department?: StaffDepartment;
|
|
3527
|
+
role?: StaffRole;
|
|
3528
|
+
status?: StaffStatus;
|
|
3529
|
+
hireDate?: string;
|
|
3530
|
+
notes?: string;
|
|
3531
|
+
metadata?: Record<string, unknown>;
|
|
3532
|
+
}
|
|
3533
|
+
/** Parameters for listing staff members */
|
|
3534
|
+
interface ListStaffParams {
|
|
3535
|
+
propertyId: string;
|
|
3536
|
+
department?: StaffDepartment | StaffDepartment[];
|
|
3537
|
+
role?: StaffRole | StaffRole[];
|
|
3538
|
+
status?: StaffStatus;
|
|
3539
|
+
search?: string;
|
|
3540
|
+
limit?: number;
|
|
3541
|
+
cursor?: string;
|
|
3542
|
+
}
|
|
3543
|
+
/** Paginated list of staff members */
|
|
3544
|
+
type PaginatedStaff = Paginated<Staff>;
|
|
3545
|
+
/** Input for creating a shift */
|
|
3546
|
+
interface CreateShiftInput {
|
|
3547
|
+
date: string;
|
|
3548
|
+
shiftType: ShiftType;
|
|
3549
|
+
startTime?: string;
|
|
3550
|
+
endTime?: string;
|
|
3551
|
+
notes?: string;
|
|
3552
|
+
metadata?: Record<string, unknown>;
|
|
3553
|
+
}
|
|
3554
|
+
/** Parameters for listing shifts */
|
|
3555
|
+
interface ListShiftsParams {
|
|
3556
|
+
startDate?: string;
|
|
3557
|
+
endDate?: string;
|
|
3558
|
+
shiftType?: ShiftType | ShiftType[];
|
|
3559
|
+
limit?: number;
|
|
3560
|
+
cursor?: string;
|
|
3561
|
+
}
|
|
3562
|
+
|
|
3563
|
+
/**
|
|
3564
|
+
* Service for staff management in the Atzentis Booking API.
|
|
3565
|
+
*
|
|
3566
|
+
* Provides staff CRUD with department and role filtering,
|
|
3567
|
+
* shift management with scheduling support, and multi-value
|
|
3568
|
+
* filter serialization for department and role arrays.
|
|
3569
|
+
*
|
|
3570
|
+
* @example
|
|
3571
|
+
* ```typescript
|
|
3572
|
+
* const booking = new BookingClient({ apiKey: "atz_io_live_xxxxx" });
|
|
3573
|
+
*
|
|
3574
|
+
* // Create a staff member
|
|
3575
|
+
* const member = await booking.staff.create({
|
|
3576
|
+
* propertyId: "prop_abc123",
|
|
3577
|
+
* firstName: "Maria",
|
|
3578
|
+
* lastName: "Papadopoulos",
|
|
3579
|
+
* department: "front_desk",
|
|
3580
|
+
* role: "supervisor",
|
|
3581
|
+
* });
|
|
3582
|
+
*
|
|
3583
|
+
* // List housekeeping and maintenance staff
|
|
3584
|
+
* const staff = await booking.staff.list({
|
|
3585
|
+
* propertyId: "prop_abc123",
|
|
3586
|
+
* department: ["housekeeping", "maintenance"],
|
|
3587
|
+
* status: "active",
|
|
3588
|
+
* });
|
|
3589
|
+
*
|
|
3590
|
+
* // Schedule a morning shift
|
|
3591
|
+
* await booking.staff.createShift(member.id, {
|
|
3592
|
+
* date: "2025-07-01",
|
|
3593
|
+
* shiftType: "morning",
|
|
3594
|
+
* });
|
|
3595
|
+
* ```
|
|
3596
|
+
*/
|
|
3597
|
+
declare class StaffService extends BaseService {
|
|
3598
|
+
protected readonly basePath = "/operations/v1/staff";
|
|
3599
|
+
/** Create a staff member */
|
|
3600
|
+
create(input: CreateStaffInput): Promise<Staff>;
|
|
3601
|
+
/** Get a staff member by ID */
|
|
3602
|
+
get(staffId: string): Promise<Staff>;
|
|
3603
|
+
/** List staff members with optional filters */
|
|
3604
|
+
list(params: ListStaffParams): Promise<PaginatedStaff>;
|
|
3605
|
+
/** Update a staff member */
|
|
3606
|
+
update(staffId: string, input: UpdateStaffInput): Promise<Staff>;
|
|
3607
|
+
/** Delete a staff member */
|
|
3608
|
+
delete(staffId: string): Promise<void>;
|
|
3609
|
+
/** Create a shift for a staff member */
|
|
3610
|
+
createShift(staffId: string, input: CreateShiftInput): Promise<StaffShift>;
|
|
3611
|
+
/** List shifts for a staff member */
|
|
3612
|
+
listShifts(staffId: string, params?: ListShiftsParams): Promise<StaffShift[]>;
|
|
3613
|
+
}
|
|
3614
|
+
|
|
2668
3615
|
/**
|
|
2669
3616
|
* Main SDK client for the Atzentis Booking API.
|
|
2670
3617
|
*
|
|
@@ -2680,11 +3627,16 @@ declare class BookingClient {
|
|
|
2680
3627
|
private _bookings?;
|
|
2681
3628
|
private _distribution?;
|
|
2682
3629
|
private _finance?;
|
|
3630
|
+
private _groups?;
|
|
2683
3631
|
private _guests?;
|
|
3632
|
+
private _housekeeping?;
|
|
3633
|
+
private _nightAudit?;
|
|
2684
3634
|
private _payments?;
|
|
2685
3635
|
private _properties?;
|
|
3636
|
+
private _ratePlans?;
|
|
2686
3637
|
private _categories?;
|
|
2687
3638
|
private _spaces?;
|
|
3639
|
+
private _staff?;
|
|
2688
3640
|
constructor(config: BookingClientConfig);
|
|
2689
3641
|
/** Availability service — lazy-initialized on first access */
|
|
2690
3642
|
get availability(): AvailabilityService;
|
|
@@ -2694,16 +3646,26 @@ declare class BookingClient {
|
|
|
2694
3646
|
get distribution(): DistributionService;
|
|
2695
3647
|
/** Finance service — lazy-initialized on first access */
|
|
2696
3648
|
get finance(): FinanceService;
|
|
3649
|
+
/** Groups service — lazy-initialized on first access */
|
|
3650
|
+
get groups(): GroupsService;
|
|
2697
3651
|
/** Guests service — lazy-initialized on first access */
|
|
2698
3652
|
get guests(): GuestsService;
|
|
3653
|
+
/** Housekeeping service — lazy-initialized on first access */
|
|
3654
|
+
get housekeeping(): HousekeepingService;
|
|
3655
|
+
/** Night audit service — lazy-initialized on first access */
|
|
3656
|
+
get nightAudit(): NightAuditService;
|
|
2699
3657
|
/** Payments service — lazy-initialized on first access */
|
|
2700
3658
|
get payments(): PaymentsService;
|
|
2701
3659
|
/** Properties service — lazy-initialized on first access */
|
|
2702
3660
|
get properties(): PropertiesService;
|
|
3661
|
+
/** Rate plans service — lazy-initialized on first access */
|
|
3662
|
+
get ratePlans(): RatePlansService;
|
|
2703
3663
|
/** Categories service — lazy-initialized on first access */
|
|
2704
3664
|
get categories(): CategoriesService;
|
|
2705
3665
|
/** Spaces service — lazy-initialized on first access */
|
|
2706
3666
|
get spaces(): SpacesService;
|
|
3667
|
+
/** Staff service — lazy-initialized on first access */
|
|
3668
|
+
get staff(): StaffService;
|
|
2707
3669
|
setApiKey(key: string): void;
|
|
2708
3670
|
setTenantId(id: string): void;
|
|
2709
3671
|
}
|
|
@@ -2786,4 +3748,4 @@ declare function firstPage<T>(fetcher: PageFetcher<T>, options?: PaginationOptio
|
|
|
2786
3748
|
|
|
2787
3749
|
declare const VERSION = "0.1.0";
|
|
2788
3750
|
|
|
2789
|
-
export { type AccountingDailyReport, type AccountingReportParams, type AccountingRevenueReport, type AccountingVatReport, type AssignSpaceInput, AuthenticationError, type Authorization, type AuthorizationStatus, type AuthorizeInput, type AvailabilityCheckParams, type AvailabilityPricing, type AvailabilityRestrictions, type AvailabilityResult, type AvailabilitySearchParams, type AvailabilitySearchResult, type AvailabilitySearchResultEntry, AvailabilityService, type AvailableSpace, BOOKING_STATUSES, BOOKING_TYPES, type Booking, BookingClient, type BookingClientConfig, BookingError, type BookingErrorOptions, type BookingGuest, type BookingPricing, type BookingSort, type BookingSpace, type BookingStatus, type BookingType, BookingsService, type BulkUpdateSpaceInput, type CalendarDay, type CalendarParams, type CancelBookingInput, type CaptureInput, type CardDetails, CategoriesService, type Channel, type ChannelCredentials, type ChannelMapping, type ChannelSettings, type ChannelStatus, type ChannelType, type ChargeType, type CheckInInput, type CheckOutInput, ConflictError, type Coordinates, type CreateBookingInput, type CreateCategoryInput, type CreateChannelInput, type CreateChargeInput, type CreateFolioInput, type CreateFolioPaymentInput, type CreateGuestInput, type CreateInvoiceInput, type CreateMappingInput, type CreatePaymentAccountInput, type CreatePropertyInput, type CreateSpaceInput, DEFAULT_MODULES, DistributionService, type DuplicateCandidate, FinanceService, type Folio, type FolioCharge, type FolioPayment, type FolioStatus, ForbiddenError, type Guest, type GuestAddress, type GuestBookingSummary, type GuestDuplicateResult, type GuestFolioSummary, type GuestHistoryParams, type GuestMatch, type GuestOrderSummary, type GuestPreferences, type GuestSearchResult, type GuestSort, GuestsService, HttpClient, type HttpClientOptions, type HttpMethod, type HttpResponse, type ICalExportResult, type ICalImportInput, type ICalImportResult, type Invoice, type InvoiceStatus, type IrisInitiateInput, type IrisTransfer, type IrisTransferStatus, type LinkPosTableInput, type ListBookingsParams, type ListCategoriesParams, type ListChannelsParams, type ListChargesParams, type ListFolioPaymentsParams, type ListFoliosParams, type ListGuestsParams, type ListMappingsParams, type ListPaymentAccountsParams, type ListPropertiesParams, type ListSpacesParams, type ListTransactionsParams, type Logger, type MergeGuestsInput, type MoveChargesInput, type NoShowInput, NotFoundError, PROPERTY_MODULES, type PageFetcher, type Paginated, type PaginatedBookings, type PaginatedChannels, type PaginatedCharges, type PaginatedFolioPayments, type PaginatedFolios, type PaginatedGuestBookings, type PaginatedGuestFolios, type PaginatedGuestOrders, type PaginatedGuests, type PaginatedMappings, type PaginatedPaymentAccounts, type PaginatedSyncLog, type PaginatedTransactions, type PaginationOptions, type Payment, type PaymentAccount, type PaymentAccountStatus, PaymentError, type PaymentProvider, type PaymentStatus, PaymentsService, type PriceRange, type PricingParams, type PricingResult, type ProcessPaymentInput, PropertiesService, type Property, type PropertyAddress, type PropertyModules, type PropertyStatus, type PropertyType, type PullSyncInput, type PushSyncInput, RateLimitError, type Refund, type RefundInput, type RefundStatus, type RequestOptions, type ResolvedBookingClientConfig, type RetryConfig, type RetryOptions, SPACE_STATUSES, SPACE_TYPES, type SearchGuestsParams, ServerError, type ServiceSlotParams, type ServiceTimeSlot, type Space, type SpaceCategory, type SpaceStatus, type SpaceType, SpacesService, type SyncError, type SyncLogParams, type SyncOperation, type SyncOperationStatus, type SyncOperationType, type SyncStats, type TableSlotParams, type TerminalAuthorizeInput, type TerminalTransaction, type TerminalTransactionStatus, type TimeSlot, TimeoutError, type Transaction, type TransactionType, type UpdateBookingInput, type UpdateCategoryInput, type UpdateChannelInput, type UpdateFolioInput, type UpdateGuestInput, type UpdateGuestPreferences, type UpdatePropertyInput, type UpdateSpaceInput, VERSION, ValidationError, type VatBreakdownEntry, bookingClientConfigSchema, createErrorFromResponse, firstPage, paginate };
|
|
3751
|
+
export { type AccountingDailyReport, type AccountingReportParams, type AccountingRevenueReport, type AccountingVatReport, type AppliedRestriction, type AssignSpaceInput, AuthenticationError, type Authorization, type AuthorizationStatus, type AuthorizeInput, type AvailabilityCheckParams, type AvailabilityPricing, type AvailabilityRestrictions, type AvailabilityResult, type AvailabilitySearchParams, type AvailabilitySearchResult, type AvailabilitySearchResultEntry, AvailabilityService, type AvailableSpace, BOOKING_STATUSES, BOOKING_TYPES, type Block, type BlockDate, type Booking, BookingClient, type BookingClientConfig, BookingError, type BookingErrorOptions, type BookingGuest, type BookingPricing, type BookingSort, type BookingSpace, type BookingStatus, type BookingType, BookingsService, type BulkUpdateSpaceInput, type CalculateRateInput, type CalendarDay, type CalendarParams, type CancelBookingInput, type CaptureInput, type CardDetails, CategoriesService, type CategoryPickup, type Channel, type ChannelCredentials, type ChannelMapping, type ChannelSettings, type ChannelStatus, type ChannelType, type ChargeType, type CheckInInput, type CheckOutInput, type ComparePortfolioRatesInput, ConflictError, type Coordinates, type CreateBlockInput, type CreateBookingInput, type CreateCategoryInput, type CreateChannelInput, type CreateChargeInput, type CreateFolioInput, type CreateFolioPaymentInput, type CreateGroupFolioInput, type CreateGroupInput, type CreateGuestInput, type CreateHousekeepingTaskInput, type CreateInvoiceInput, type CreateMappingInput, type CreatePaymentAccountInput, type CreatePropertyInput, type CreateRatePeriodInput, type CreateRatePlanInput, type CreateShiftInput, type CreateSpaceInput, type CreateStaffInput, DEFAULT_MODULES, type DatePickup, DistributionService, type DuplicateCandidate, FinanceService, type Folio, type FolioCharge, type FolioPayment, type FolioPostCharge, type FolioPostInput, type FolioPostItem, type FolioPostResult, type FolioStatus, ForbiddenError, type GetBoardParams, type GetNightAuditHistoryParams, type Group, type GroupBlockSummary, type GroupFolioResult, type GroupStatus, type GroupType, GroupsService, type Guest, type GuestAddress, type GuestBookingSummary, type GuestDuplicateResult, type GuestFolioSummary, type GuestHistoryParams, type GuestMatch, type GuestOrderSummary, type GuestPreferences, type GuestSearchResult, type GuestSort, GuestsService, type HousekeepingBoard, type HousekeepingBoardEntry, type HousekeepingPriority, HousekeepingService, type HousekeepingStatus, type HousekeepingTask, type HousekeepingTaskStatus, type HousekeepingTaskType, HttpClient, type HttpClientOptions, type HttpMethod, type HttpResponse, type ICalExportResult, type ICalImportInput, type ICalImportResult, type Invoice, type InvoiceStatus, type IrisInitiateInput, type IrisTransfer, type IrisTransferStatus, type LinkPosTableInput, type ListBookingsParams, type ListCategoriesParams, type ListChannelsParams, type ListChargesParams, type ListFolioPaymentsParams, type ListFolioPostParams, type ListFoliosParams, type ListGroupsParams, type ListGuestsParams, type ListHousekeepingTasksParams, type ListMappingsParams, type ListPaymentAccountsParams, type ListPropertiesParams, type ListRatePeriodsParams, type ListRatePlansParams, type ListShiftsParams, type ListSpacesParams, type ListStaffParams, type ListTransactionsParams, type Logger, type MergeGuestsInput, type MoveChargesInput, type NightAuditDiscrepancy, type NightAuditError, type NightAuditOccupancy, type NightAuditPaymentMethod, type NightAuditPayments, type NightAuditReport, type NightAuditRevenue, type NightAuditRevenueBreakdown, type NightAuditRun, NightAuditService, type NightAuditStatus, type NightAuditSummary, type NightlyRate, type NoShowInput, NotFoundError, type OccupancyStatus, PROPERTY_MODULES, type PageFetcher, type Paginated, type PaginatedBookings, type PaginatedChannels, type PaginatedCharges, type PaginatedFolioPayments, type PaginatedFolioPostCharges, type PaginatedFolios, type PaginatedGroups, type PaginatedGuestBookings, type PaginatedGuestFolios, type PaginatedGuestOrders, type PaginatedGuests, type PaginatedHousekeepingTasks, type PaginatedMappings, type PaginatedNightAuditRuns, type PaginatedPaymentAccounts, type PaginatedRatePeriods, type PaginatedRatePlans, type PaginatedStaff, type PaginatedSyncLog, type PaginatedTransactions, type PaginationOptions, type Payment, type PaymentAccount, type PaymentAccountStatus, PaymentError, type PaymentProvider, type PaymentStatus, PaymentsService, type Pickup, type PortfolioPropertyRate, type PortfolioRateComparison, type PortfolioRatePushResult, type PortfolioTargetResult, type PriceRange, type PricingParams, type PricingResult, type ProcessPaymentInput, PropertiesService, type Property, type PropertyAddress, type PropertyModules, type PropertyStatus, type PropertyType, type PullSyncInput, type PushPortfolioRatesInput, type PushSyncInput, type RateCalculation, RateLimitError, type RateModifier, type RatePeriod, type RatePlan, type RatePlanStatus, RatePlansService, type RateRestriction, type Refund, type RefundInput, type RefundStatus, type ReleaseBlocksInput, type ReleaseResult, type RequestOptions, type ResolvedBookingClientConfig, type RetryConfig, type RetryOptions, type RunNightAuditInput, SPACE_STATUSES, SPACE_TYPES, type SearchGuestsParams, ServerError, type ServiceSlotParams, type ServiceTimeSlot, type ShiftType, type Space, type SpaceCategory, type SpaceStatus, type SpaceType, SpacesService, type Staff, type StaffDepartment, type StaffRole, StaffService, type StaffShift, type StaffStatus, type SyncError, type SyncLogParams, type SyncOperation, type SyncOperationStatus, type SyncOperationType, type SyncStats, type TableSlotParams, type TerminalAuthorizeInput, type TerminalTransaction, type TerminalTransactionStatus, type TimeSlot, TimeoutError, type Transaction, type TransactionType, type UpdateBookingInput, type UpdateCategoryInput, type UpdateChannelInput, type UpdateFolioInput, type UpdateGroupInput, type UpdateGuestInput, type UpdateGuestPreferences, type UpdateHousekeepingTaskInput, type UpdatePropertyInput, type UpdateRatePeriodInput, type UpdateRatePlanInput, type UpdateRateRestrictionInput, type UpdateSpaceInput, type UpdateSpaceStatusInput, type UpdateStaffInput, VERSION, ValidationError, type VatBreakdownEntry, bookingClientConfigSchema, createErrorFromResponse, firstPage, paginate };
|