UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

73 lines (72 loc) 2.71 kB
import { ContactPropertyRelationsAPIV4Api } from '../generated'; export class RelationsContactProperty { constructor(config) { const api = new ContactPropertyRelationsAPIV4Api(config); this.list = new RelationsContactPropertyList(api); this.create = new RelationsContactPropertyCreate(api); this.update = new RelationsContactPropertyUpdate(api); this.delete = new RelationsContactPropertyDelete(api); } } export class RelationsContactPropertyList { constructor(api) { this.api = api; } /** * one - get /v4/contact-property-relations/contacts/{contactId}/properties/{pid} */ one(contactId, pid, options) { return this.api.v4ContactPropertyRelationsControllerGetRelContactPropertyV4({ contactId, pid, ...options }); } /** * oneWithColumns - get /v4/contact-property-relations/contacts/{contactId}/properties/{pid}/{columns} */ oneWithColumns(contactId, pid, columns, options) { return this.api.v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4({ contactId, pid, columns, ...options }); } /** * all - get /v4/contact-property-relations */ all(options) { return this.api.v4ContactPropertyRelationsControllerGetRelContactPropertiesV4({ ...options }); } /** * withView - get /v4/contact-property-relations/viewId/{viewId} */ withView(viewId, options) { return this.api.v4ContactPropertyRelationsControllerGetRelContactPropertiesInViewV4({ viewId, ...options }); } } export class RelationsContactPropertyCreate { constructor(api) { this.api = api; } /** * one - post /v4/contact-property-relations */ one(body) { return this.api.v4ContactPropertyRelationsControllerCreateRelContactPropertyV4({ v4ContactPropertyRelationsCreateRelContactPropertyBodyDto: body }); } } export class RelationsContactPropertyUpdate { constructor(api) { this.api = api; } /** * one - patch /v4/contact-property-relations/contacts/{contactId}/properties/{pid} */ one(contactId, pid, body) { return this.api.v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4({ contactId, pid, v4ContactPropertyRelationsUpdateRelContactPropertyBodyDto: { relContactProperty: body } }); } } export class RelationsContactPropertyDelete { constructor(api) { this.api = api; } /** * one - delete /v4/contact-property-relations/contacts/{contactId}/properties/{pid} */ one(contactId, pid, options) { return this.api.v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4({ contactId, pid, ...options }); } }