@powerhouse-technology/pms-js-sdk
v2.1.0
Published
Powerhouse PMS JavaScript/TypeScript SDK
Readme
@powerhouse-technology/pms-js-sdk
TypeScript/JavaScript SDK for the Powerhouse Property Management System (PMS) API.
Installation
npm install @powerhouse-technology/pms-js-sdkUsage
import { newPmsClient } from '@powerhouse-technology/pms-js-sdk';
import type { Property, Booking } from '@powerhouse-technology/pms-js-sdk';
// Initialize the client
const pms = newPmsClient({
baseURL: 'https://api.example.com',
tokenProvider: async () => 'your-auth-token',
});
// Query properties
const properties = await pms.property.query({
filter: { status: 'active' },
page: 1,
perPage: 20,
});
// Fetch a single booking
const booking = await pms.booking.fetch({ id: 123 });
// Create a new resource
const newBooking = await pms.booking.create({
propertyId: 1,
checkIn: '2024-01-15',
checkOut: '2024-01-20',
});Available Clients
The SDK provides typed clients for all PMS resources:
user,tenant,account,profileproperty,propertyRoom,amenity,location,regionbooking,bookingGuest,bookingProductpayment,paymentGateway,creditCard,stripechannel,channelProperty,integrationavailability,discount,paymentSchedule- And many more...
See dist/cjs/index.d.ts for the complete list of available clients and their methods.
License
MIT
