@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
73 lines (72 loc) • 2.63 kB
JavaScript
import { RelationsLeadPropertiesAPIV4Api } from '../generated';
export class RelationsLeadProperty {
constructor(config) {
const api = new RelationsLeadPropertiesAPIV4Api(config);
this.list = new RelationsLeadPropertyList(api);
this.create = new RelationsLeadPropertyCreate(api);
this.update = new RelationsLeadPropertyUpdate(api);
this.delete = new RelationsLeadPropertyDelete(api);
}
}
export class RelationsLeadPropertyList {
constructor(api) {
this.api = api;
}
/**
* one - get /v4/lead-property-relations/leads/{leadId}/properties/{propertyId}
*/
one(leadId, propertyId, options) {
return this.api.v4LeadPropertyRelationsControllerGetRelLeadPropertyV4({ leadId, propertyId, ...options });
}
/**
* oneWithColumns - get /v4/lead-property-relations/leads/{leadId}/properties/{propertyId}/{columns}
*/
oneWithColumns(leadId, propertyId, columns, options) {
return this.api.v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4({ leadId, propertyId, columns, ...options });
}
/**
* all - get /v4/lead-property-relations
*/
all(options) {
return this.api.v4LeadPropertyRelationsControllerGetRelLeadPropertiesV4({ ...options });
}
/**
* withView - get /v4/lead-property-relations/viewId/{viewId}
*/
withView(viewId, options) {
return this.api.v4LeadPropertyRelationsControllerGetRelLeadPropertiesInViewV4({ viewId, ...options });
}
}
export class RelationsLeadPropertyCreate {
constructor(api) {
this.api = api;
}
/**
* one - post /v4/lead-property-relations
*/
one(body) {
return this.api.v4LeadPropertyRelationsControllerCreateRelLeadPropertyV4({ v4LeadPropertyRelationsCreateRelLeadPropertyBodyDto: body });
}
}
export class RelationsLeadPropertyUpdate {
constructor(api) {
this.api = api;
}
/**
* one - patch /v4/lead-property-relations/leads/{leadId}/properties/{propertyId}
*/
one(leadId, propertyId, body) {
return this.api.v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4({ leadId, propertyId, v4LeadPropertyRelationsUpdateRelLeadPropertyBodyDto: { relation: body } });
}
}
export class RelationsLeadPropertyDelete {
constructor(api) {
this.api = api;
}
/**
* one - delete /v4/lead-property-relations/leads/{leadId}/properties/{propertyId}
*/
one(leadId, propertyId, options) {
return this.api.v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4({ leadId, propertyId, ...options });
}
}