officernd-mcp-server
Version:
MCP server for OfficeRnD workspace management - create, search, update and cancel bookings
107 lines • 4.13 kB
TypeScript
import { BookingSearchParams, BookingSearchResponse, Booking, MemberSearchParams, MemberSearchResponse, Member, ResourceSearchParams, ResourceSearchResponse, Resource, ResourceTypeSearchResponse, CompanySearchParams, CompanySearchResponse, Company, CreateBookingParams, UpdateBookingParams, CancelBookingResponse, ResourceRateSearchParams, ResourceRateSearchResponse, ResourceRate } from './types.js';
export declare class OfficeRnDClient {
private clientId;
private clientSecret;
private orgSlug;
private accessToken;
private tokenExpiry;
private baseUrl;
private identityUrl;
private resourceCache;
private resourceRateCache;
private readonly API_LIMIT_MAX;
constructor(clientId: string, clientSecret: string, orgSlug: string, cacheMinutes?: number);
/**
* Validates and normalizes the limit parameter to ensure it doesn't exceed OfficeRnD's API limit
*/
private validateLimit;
private ensureAuthenticated;
private authenticate;
searchBookings(params: BookingSearchParams): Promise<BookingSearchResponse>;
getBookingDetails(bookingId: string): Promise<Booking>;
/**
* Get booking details with enriched resource information
* This method fetches the full booking details and includes the resource information if available
*/
getBookingDetailsWithResource(bookingId: string): Promise<{
booking: Booking;
resource?: Resource;
}>;
/**
* Search bookings and enrich them with resource information
* This method performs additional API calls to get full booking details including resources
*/
searchBookingsWithResources(params: BookingSearchParams): Promise<{
rangeStart: number;
rangeEnd: number;
cursorNext?: string;
cursorPrev?: string;
results: Array<{
booking: Booking;
resource?: Resource;
}>;
}>;
searchMembers(params: MemberSearchParams): Promise<MemberSearchResponse>;
getMemberDetails(memberId: string): Promise<Member>;
searchResources(params: ResourceSearchParams): Promise<ResourceSearchResponse>;
getResourceDetails(resourceId: string): Promise<Resource>;
getResourceTypes(): Promise<ResourceTypeSearchResponse>;
/**
* Preload all resources into cache
* Useful for warming up the cache with all available resources
*/
preloadResourceCache(): Promise<number>;
/**
* Get cache statistics
*/
getResourceCacheStats(): {
size: number;
resources: string[];
};
/**
* Clear the resource cache
*/
clearResourceCache(): void;
searchCompanies(params: CompanySearchParams): Promise<CompanySearchResponse>;
getCompanyDetails(companyId: string): Promise<Company>;
createBooking(params: CreateBookingParams, options?: {
isSilent?: boolean;
}): Promise<Booking>;
updateBooking(bookingId: string, params: UpdateBookingParams): Promise<Booking>;
cancelBooking(bookingId: string): Promise<CancelBookingResponse>;
searchResourceRates(params: ResourceRateSearchParams): Promise<ResourceRateSearchResponse>;
getResourceRateDetails(resourceRateId: string): Promise<ResourceRate>;
/**
* Get all rates for a specific resource
*/
getRatesForResource(resourceId: string): Promise<ResourceRate[]>;
/**
* Preload all resource rates into cache
*/
preloadResourceRateCache(): Promise<number>;
/**
* Get resource rate cache statistics
*/
getResourceRateCacheStats(): {
size: number;
rates: string[];
resources: string[];
};
/**
* Clear the resource rate cache
*/
clearResourceRateCache(): void;
/**
* Get bookable resources with their rates
* This method combines resource information with pricing data
*/
getBookableResourcesWithRates(params?: {
locationId?: string;
resourceTypeId?: string;
limit?: number;
}): Promise<Array<{
resource: Resource;
rates: ResourceRate[];
}>>;
}
//# sourceMappingURL=officernd-client.d.ts.map