UNPKG

@allthings/sdk

Version:
32 lines (31 loc) 1.64 kB
import { EntityResultList, IAllthingsRestClient } from '../types'; export interface IProperty { readonly _embedded: any; readonly billingPeriodEndDate: string; readonly billingPeriodStartDate: string; readonly dataSource?: string; readonly externalId?: string; readonly id: string; readonly label: string; readonly name: string; readonly propertyOwner: string; readonly readOnly: boolean; readonly timezone: string; } export type PartialProperty = Partial<IProperty>; export type PropertyResult = Promise<IProperty>; export type PropertyResultList = EntityResultList<IProperty>; export type MethodPropertyCreate = (appId: string, data: PartialProperty & { readonly name: string; readonly timezone: string; }) => PropertyResult; export declare function propertyCreate(client: IAllthingsRestClient, appId: string, data: PartialProperty & { readonly name: string; readonly timezone: string; }): PropertyResult; export type MethodPropertyGetById = (propertyId: string) => PropertyResult; export declare function propertyGetById(client: IAllthingsRestClient, propertyId: string): PropertyResult; export type MethodPropertyUpdateById = (propertyId: string, data: PartialProperty) => PropertyResult; export declare function propertyUpdateById(client: IAllthingsRestClient, propertyId: string, data: PartialProperty): PropertyResult; export type MethodGetProperties = (page?: number, limit?: number, filter?: Record<string, any>) => PropertyResultList; export declare function getProperties(client: IAllthingsRestClient, page?: number, limit?: number, filter?: {}): PropertyResultList;