@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
73 lines (72 loc) • 2.73 kB
JavaScript
import { RelInspectionUsersAPIV4Api } from '../generated';
export class InspectionUserRelations {
constructor(config) {
const api = new RelInspectionUsersAPIV4Api(config);
this.list = new InspectionUserRelationsList(api);
this.create = new InspectionUserRelationsCreate(api);
this.update = new InspectionUserRelationsUpdate(api);
this.delete = new InspectionUserRelationsDelete(api);
}
}
export class InspectionUserRelationsList {
constructor(api) {
this.api = api;
}
/**
* one - get /v4/inspection-user-relations/inspections/{inspectionId}/users/{userId}
*/
one(inspectionId, userId, options) {
return this.api.v4InspectionUserRelationsControllerGetRelInspectionUserV4({ inspectionId, userId, ...options });
}
/**
* oneWithColumns - get /v4/inspection-user-relations/inspections/{inspectionId}/users/{userId}/{columns}
*/
oneWithColumns(inspectionId, userId, columns, options) {
return this.api.v4InspectionUserRelationsControllerGetRelInspectionUserColumnsV4({ inspectionId, userId, columns, ...options });
}
/**
* all - get /v4/inspection-user-relations
*/
all(options) {
return this.api.v4InspectionUserRelationsControllerGetRelInspectionUsersV4({ ...options });
}
/**
* withView - get /v4/inspection-user-relations/viewId/{viewId}
*/
withView(viewId, options) {
return this.api.v4InspectionUserRelationsControllerGetRelInspectionUsersInViewV4({ viewId, ...options });
}
}
export class InspectionUserRelationsCreate {
constructor(api) {
this.api = api;
}
/**
* one - post /v4/inspection-user-relations
*/
one(body) {
return this.api.v4InspectionUserRelationsControllerCreateRelInspectionUserV4({ v4InspectionUserRelationsCreateRelInspectionUserBodyDto: body });
}
}
export class InspectionUserRelationsUpdate {
constructor(api) {
this.api = api;
}
/**
* one - patch /v4/inspection-user-relations/inspections/{inspectionId}/users/{userId}
*/
one(inspectionId, userId, body) {
return this.api.v4InspectionUserRelationsControllerUpdateRelInspectionUserV4({ inspectionId, userId, v4InspectionUserRelationsUpdateRelInspectionUserBodyDto: { relInspectionUser: body } });
}
}
export class InspectionUserRelationsDelete {
constructor(api) {
this.api = api;
}
/**
* one - delete /v4/inspection-user-relations/inspections/{inspectionId}/users/{userId}
*/
one(inspectionId, userId, options) {
return this.api.v4InspectionUserRelationsControllerDeleteRelInspectionUserV4({ inspectionId, userId, ...options });
}
}