UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

37 lines (36 loc) 1.01 kB
import { V4UpdatesApi } from '../generated'; export class Updates { constructor(config) { const api = new V4UpdatesApi(config); this.list = new UpdatesList(api); } } export class UpdatesList { constructor(api) { this.api = api; } /** * all - get /v4/updates */ all(options) { return this.api.v4UpdatesControllerGetUpdatesV4({ ...options }); } /** * withView - get /v4/updates/viewId/{viewId} */ withView(viewId, options) { return this.api.v4UpdatesControllerGetUpdatesInViewV4({ viewId, ...options }); } /** * one - get /v4/updates/{updateId} */ one(updateId, options) { return this.api.v4UpdatesControllerGetUpdateV4({ updateId, ...options }); } /** * oneWithColumns - get /v4/updates/{updateId}/{columns} */ oneWithColumns(updateId, columns, options) { return this.api.v4UpdatesControllerGetUpdateColumnsV4({ updateId, columns, ...options }); } }