@v-office/owner-sdk
v1.2.0
Published
Readme
@v-office/owner-sdk
Curated TypeScript SDK for the vOffice Owner App API.
Installation
pnpm add @v-office/owner-sdkUsage
import { createOwnerSDK } from "@v-office/owner-sdk";
const owner = createOwnerSDK();
const info = await owner.auth.info();
const bookings = await owner.bookings.list();
if (!bookings.ok) {
console.error(bookings.error.message);
} else {
console.log(bookings.data[0]);
}The SDK uses relative URLs internally, so it works when your app is served from the same host as the Owner API.
Methods return { ok: true, data } on success and { ok: false, error } on failure.
Types
Generated OpenAPI internals are intentionally not exported. Consumers should use the SDK surface exposed by this package:
import type { OwnerInfo, OwnerBookingsListOutput } from "@v-office/owner-sdk";