@simplyhomes/sos-sdk
Version:
TypeScript SDK for Simply Homes SoS API v4
171 lines • 119 kB
TypeScript
/**
* API v4
* Swagger documentation for API v4
*
* The version of the OpenAPI document: 4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type { V4UnitsCreateUnitBodyDto, V4UnitsCreateUnitResponseDto, V4UnitsDeleteUnitResponseDto, V4UnitsGetUnitColumnsResponseDto, V4UnitsGetUnitResponseDto, V4UnitsGetUnitsFilteredByResponseDto, V4UnitsGetUnitsInViewResponseDto, V4UnitsGetUnitsResponseDto, V4UnitsUpdateUnitBodyDto, V4UnitsUpdateUnitResponseDto } from '../models/index';
export interface V4UnitsControllerCreateUnitV4Request {
v4UnitsCreateUnitBodyDto: V4UnitsCreateUnitBodyDto;
}
export interface V4UnitsControllerDeleteUnitV4Request {
unitId: number;
}
export interface V4UnitsControllerGetUnitColumnsV4Request {
columns: string;
unitId: number;
}
export interface V4UnitsControllerGetUnitV4Request {
unitId: number;
viewId?: number;
}
export interface V4UnitsControllerGetUnitsFilteredByV4Request {
column: string;
value: string;
viewId?: number;
columns?: string;
limit?: number;
offset?: number;
countOnly?: boolean;
filterOperation?: V4UnitsControllerGetUnitsFilteredByV4FilterOperation;
}
export interface V4UnitsControllerGetUnitsInViewV4Request {
viewId: number;
limit?: number;
offset?: number;
countOnly?: boolean;
}
export interface V4UnitsControllerGetUnitsV4Request {
viewId?: number;
limit?: number;
offset?: number;
countOnly?: boolean;
}
export interface V4UnitsControllerUpdateUnitV4Request {
unitId: number;
v4UnitsUpdateUnitBodyDto: V4UnitsUpdateUnitBodyDto;
}
/**
* UnitsAPIV4Api - interface
*
* @export
* @interface UnitsAPIV4ApiInterface
*/
export interface UnitsAPIV4ApiInterface {
/**
* # POST /v4/units ## Overview Creates a new unit within an existing property. This endpoint allows you to add units to properties, specifying basic information like bedroom and bathroom counts. The unit is automatically associated with the specified property and organization. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body must contain a JSON object with the unit information. ### Content Type - **application/json** ### Required Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | `propertyId` | string | Yes | The ID of the property this unit belongs to | | `bedrooms` | number | Yes | The number of bedrooms in the unit | | `bathrooms` | number | Yes | The number of bathrooms in the unit | ### Other Property\'s Fields - Additional fields from the `SoSUnitEntity_Base` can be included but are not required for creation. ### Request Structure ```json { \"propertyId\": \"property-123\", \"bedrooms\": 2, \"bathrooms\": 1 } ``` ## Property Validation The system validates: - **Property Existence**: The specified property must exist - **Property Access**: Property must belong to the user\'s organization - **Valid Counts**: Bedroom and bathroom counts must be positive numbers ## Unit Initialization Upon successful creation, the unit is initialized with: - **Basic Information**: Bedroom and bathroom counts as specified - **Property Association**: Linked to the specified property - **Organization Assignment**: Inherits organization from the parent property - **Default Status**: Unit starts with default rental status - **System Metadata**: Creation timestamps and audit information - **Default Values**: System-generated defaults for optional fields ## Use Cases This endpoint is ideal for: - **Property Setup**: Adding units when setting up new properties - **Portfolio Expansion**: Adding units to existing multi-unit properties - **Manual Entry**: Creating units through user interfaces - **Bulk Operations**: Programmatically adding multiple units to properties - **Data Migration**: Importing unit data from external systems ## Validation Process The system validates: - **Property Access**: User must have access to the specified property - **Data Format**: Bedroom and bathroom counts must be valid numbers - **Organization Consistency**: Property must belong to user\'s organization - **Required Fields**: All required fields must be provided ## Performance Considerations - **Property Lookup**: System validates property existence and access - **Database Transaction**: Unit creation is atomic and transactional - **Immediate Availability**: Unit is available for operations immediately - **Auto-incrementing ID**: Unit receives auto-generated unique identifier
* @summary Create a new unit
* @param {V4UnitsCreateUnitBodyDto} v4UnitsCreateUnitBodyDto
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerCreateUnitV4Raw(requestParameters: V4UnitsControllerCreateUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsCreateUnitResponseDto>>;
/**
* # POST /v4/units ## Overview Creates a new unit within an existing property. This endpoint allows you to add units to properties, specifying basic information like bedroom and bathroom counts. The unit is automatically associated with the specified property and organization. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body must contain a JSON object with the unit information. ### Content Type - **application/json** ### Required Fields | Field | Type | Required | Description | |-------|------|----------|-------------| | `propertyId` | string | Yes | The ID of the property this unit belongs to | | `bedrooms` | number | Yes | The number of bedrooms in the unit | | `bathrooms` | number | Yes | The number of bathrooms in the unit | ### Other Property\'s Fields - Additional fields from the `SoSUnitEntity_Base` can be included but are not required for creation. ### Request Structure ```json { \"propertyId\": \"property-123\", \"bedrooms\": 2, \"bathrooms\": 1 } ``` ## Property Validation The system validates: - **Property Existence**: The specified property must exist - **Property Access**: Property must belong to the user\'s organization - **Valid Counts**: Bedroom and bathroom counts must be positive numbers ## Unit Initialization Upon successful creation, the unit is initialized with: - **Basic Information**: Bedroom and bathroom counts as specified - **Property Association**: Linked to the specified property - **Organization Assignment**: Inherits organization from the parent property - **Default Status**: Unit starts with default rental status - **System Metadata**: Creation timestamps and audit information - **Default Values**: System-generated defaults for optional fields ## Use Cases This endpoint is ideal for: - **Property Setup**: Adding units when setting up new properties - **Portfolio Expansion**: Adding units to existing multi-unit properties - **Manual Entry**: Creating units through user interfaces - **Bulk Operations**: Programmatically adding multiple units to properties - **Data Migration**: Importing unit data from external systems ## Validation Process The system validates: - **Property Access**: User must have access to the specified property - **Data Format**: Bedroom and bathroom counts must be valid numbers - **Organization Consistency**: Property must belong to user\'s organization - **Required Fields**: All required fields must be provided ## Performance Considerations - **Property Lookup**: System validates property existence and access - **Database Transaction**: Unit creation is atomic and transactional - **Immediate Availability**: Unit is available for operations immediately - **Auto-incrementing ID**: Unit receives auto-generated unique identifier
* Create a new unit
*/
v4UnitsControllerCreateUnitV4(requestParameters: V4UnitsControllerCreateUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsCreateUnitResponseDto>;
/**
* # DELETE /v4/units/{unitId} ## Overview Deletes a specific unit by its unique unit ID. This endpoint permanently removes a unit from the system along with any associated data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to delete | ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Unit Ownership**: Only units within the organization can be deleted - **Data Privacy**: Unit data is isolated between organizations ## Deletion Process When a unit is deleted: - **Permanent Removal**: The unit record is permanently removed from the system - **Associated Data**: All unit-related data is also removed - **Property Impact**: Parent property calculations may be updated - **Audit Trail**: Deletion event is logged for compliance tracking - **Irreversible**: This action cannot be undone ## Use Cases This endpoint is ideal for: - **Property Cleanup**: Removing units that were created in error - **Portfolio Management**: Removing units when properties are restructured - **Data Correction**: Cleaning up duplicate or incorrect unit records - **Property Conversion**: Removing units when converting property types - **System Maintenance**: Bulk cleanup operations ## Validation The system validates: - **Unit Existence**: Unit must exist in the system - **Organization Access**: Unit must belong to the user\'s organization - **Deletion Permissions**: User must have permission to delete units - **Data Integrity**: System ensures referential integrity after deletion ## Impact of Deletion Unit deletion may: - **Update Property Metrics**: Parent property calculations are recalculated - **Remove from Views**: Unit will no longer appear in any filtered views - **Clear References**: Any references to the unit are cleaned up - **Trigger Notifications**: System may generate deletion notifications - **Update Reports**: Unit will be excluded from future reports ## Business Rules - **Immediate Effect**: Deletion takes effect immediately - **Cascade Effects**: Related calculations and aggregations are updated - **Audit Compliance**: All deletions are logged for compliance purposes - **Data Consistency**: System maintains data integrity across all related entities ## Performance Considerations - **Immediate Deletion**: Unit is removed immediately from the system - **Cleanup Operations**: Related data cleanup happens automatically - **Cache Invalidation**: Relevant caches are invalidated automatically - **Database Optimization**: Deletion operations are optimized for performance
* @summary Delete a specific unit by unitId
* @param {number} unitId The unique identifier of the unit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerDeleteUnitV4Raw(requestParameters: V4UnitsControllerDeleteUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsDeleteUnitResponseDto>>;
/**
* # DELETE /v4/units/{unitId} ## Overview Deletes a specific unit by its unique unit ID. This endpoint permanently removes a unit from the system along with any associated data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to delete | ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Unit Ownership**: Only units within the organization can be deleted - **Data Privacy**: Unit data is isolated between organizations ## Deletion Process When a unit is deleted: - **Permanent Removal**: The unit record is permanently removed from the system - **Associated Data**: All unit-related data is also removed - **Property Impact**: Parent property calculations may be updated - **Audit Trail**: Deletion event is logged for compliance tracking - **Irreversible**: This action cannot be undone ## Use Cases This endpoint is ideal for: - **Property Cleanup**: Removing units that were created in error - **Portfolio Management**: Removing units when properties are restructured - **Data Correction**: Cleaning up duplicate or incorrect unit records - **Property Conversion**: Removing units when converting property types - **System Maintenance**: Bulk cleanup operations ## Validation The system validates: - **Unit Existence**: Unit must exist in the system - **Organization Access**: Unit must belong to the user\'s organization - **Deletion Permissions**: User must have permission to delete units - **Data Integrity**: System ensures referential integrity after deletion ## Impact of Deletion Unit deletion may: - **Update Property Metrics**: Parent property calculations are recalculated - **Remove from Views**: Unit will no longer appear in any filtered views - **Clear References**: Any references to the unit are cleaned up - **Trigger Notifications**: System may generate deletion notifications - **Update Reports**: Unit will be excluded from future reports ## Business Rules - **Immediate Effect**: Deletion takes effect immediately - **Cascade Effects**: Related calculations and aggregations are updated - **Audit Compliance**: All deletions are logged for compliance purposes - **Data Consistency**: System maintains data integrity across all related entities ## Performance Considerations - **Immediate Deletion**: Unit is removed immediately from the system - **Cleanup Operations**: Related data cleanup happens automatically - **Cache Invalidation**: Relevant caches are invalidated automatically - **Database Optimization**: Deletion operations are optimized for performance
* Delete a specific unit by unitId
*/
v4UnitsControllerDeleteUnitV4(requestParameters: V4UnitsControllerDeleteUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsDeleteUnitResponseDto>;
/**
* # GET /v4/units/{unitId}/{columns} ## Overview Retrieves specific columns of unit data for a given unit ID. This endpoint allows you to request only the specific unit fields you need, providing optimized performance and reduced data transfer. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to retrieve | | `columns` | string | Yes | Ampersand-separated list of column names to return | ### Column Parameter Format The columns parameter should be formatted as: - **Single Column**: `columnName` - **Multiple Columns**: `column1&column2&column3` - **Example**: `name&bedrooms&bathrooms&rentalStatus` ### Available Columns Common unit columns include: - **Basic Info**: `uid`, `name`, `bedrooms`, `bathrooms`, `pid` - **Rental**: `grossRentFinal`, `rentalStatus`, `rentalActualRent` - **Utilities**: `utilitiesSimplyPaying`, `utilitiesTenantPaying` - **HCV**: `hcvRentFinal`, `hcvRent` - **Access**: `accessDetailType`, `accessDetailCode` - **Appliances**: `refrigeratorDetailsExists`, `stoveDetailsExists`, `hvacDetailsExists` - **Market**: `marketRentAverage`, `marketRentMedian` ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Column Validation**: Requested columns must exist in the unit schema - **Data Privacy**: Unit data is isolated between organizations ## Performance Benefits This endpoint provides several performance advantages: - **Reduced Data Transfer**: Only requested columns are returned - **Faster Queries**: Database queries are optimized for specific columns - **Bandwidth Efficiency**: Smaller responses reduce network usage - **Targeted Access**: Get exactly the data you need for specific use cases ## Use Cases This endpoint is ideal for: - **List Views**: Get minimal data for unit listings (name, bedrooms, bathrooms, status) - **Dashboard Widgets**: Retrieve only specific metrics for dashboard displays - **Quick Status Checks**: Check specific units for rental status or condition changes - **Data Synchronization**: Update external systems with specific unit fields - **Mobile Applications**: Minimize data usage with targeted column requests ## Validation The system validates: - **Column Existence**: All requested columns must exist in the unit schema - **Unit Access**: Unit must belong to the user\'s organization - **Format**: Column parameter must follow the ampersand-separated format
* @summary Get specific columns of a unit by unitId
* @param {string} columns Comma-separated list of column names
* @param {number} unitId The unique identifier of the unit
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerGetUnitColumnsV4Raw(requestParameters: V4UnitsControllerGetUnitColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsGetUnitColumnsResponseDto>>;
/**
* # GET /v4/units/{unitId}/{columns} ## Overview Retrieves specific columns of unit data for a given unit ID. This endpoint allows you to request only the specific unit fields you need, providing optimized performance and reduced data transfer. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to retrieve | | `columns` | string | Yes | Ampersand-separated list of column names to return | ### Column Parameter Format The columns parameter should be formatted as: - **Single Column**: `columnName` - **Multiple Columns**: `column1&column2&column3` - **Example**: `name&bedrooms&bathrooms&rentalStatus` ### Available Columns Common unit columns include: - **Basic Info**: `uid`, `name`, `bedrooms`, `bathrooms`, `pid` - **Rental**: `grossRentFinal`, `rentalStatus`, `rentalActualRent` - **Utilities**: `utilitiesSimplyPaying`, `utilitiesTenantPaying` - **HCV**: `hcvRentFinal`, `hcvRent` - **Access**: `accessDetailType`, `accessDetailCode` - **Appliances**: `refrigeratorDetailsExists`, `stoveDetailsExists`, `hvacDetailsExists` - **Market**: `marketRentAverage`, `marketRentMedian` ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Column Validation**: Requested columns must exist in the unit schema - **Data Privacy**: Unit data is isolated between organizations ## Performance Benefits This endpoint provides several performance advantages: - **Reduced Data Transfer**: Only requested columns are returned - **Faster Queries**: Database queries are optimized for specific columns - **Bandwidth Efficiency**: Smaller responses reduce network usage - **Targeted Access**: Get exactly the data you need for specific use cases ## Use Cases This endpoint is ideal for: - **List Views**: Get minimal data for unit listings (name, bedrooms, bathrooms, status) - **Dashboard Widgets**: Retrieve only specific metrics for dashboard displays - **Quick Status Checks**: Check specific units for rental status or condition changes - **Data Synchronization**: Update external systems with specific unit fields - **Mobile Applications**: Minimize data usage with targeted column requests ## Validation The system validates: - **Column Existence**: All requested columns must exist in the unit schema - **Unit Access**: Unit must belong to the user\'s organization - **Format**: Column parameter must follow the ampersand-separated format
* Get specific columns of a unit by unitId
*/
v4UnitsControllerGetUnitColumnsV4(requestParameters: V4UnitsControllerGetUnitColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsGetUnitColumnsResponseDto>;
/**
* # GET /v4/units/{unitId} ## Overview Retrieves detailed information for a specific unit by its unique unit ID. This endpoint returns comprehensive unit data including rental information, appliance details, utilities configuration, and market data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection | ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Unit Ownership**: Only units within the organization can be accessed - **Data Privacy**: Unit data is isolated between organizations ## View Integration When a `viewId` is provided: - **Column Selection**: Only columns specified in the view are returned - **Consistent Structure**: Same view produces consistent response structure - **Performance**: Limiting columns can improve response time and size ## Response Structure The response contains detailed unit information including rental, appliance, and operational data. ## Use Cases This endpoint is ideal for: - **Unit Detail Pages**: Display comprehensive unit information - **Property Management**: Access operational details and configurations - **Rental Analysis**: View rental metrics and market comparisons - **Maintenance Planning**: Access appliance details and conditions - **Data Export**: Retrieve complete unit data for external systems ## Data Categories The unit data includes several categories: - **Basic Information**: Unit ID, name, bedrooms, bathrooms - **Rental Data**: Rent amounts, overrides, and status information - **Utilities Information**: Tenant and Simply utility responsibilities - **Access Details**: Access methods and codes for the unit - **Appliance Information**: Details about refrigerator, stove, HVAC, microwave - **Market Data**: Rent comparisons and market analysis - **HCV Information**: Housing Choice Voucher related data ## Performance Considerations - **Complete Data**: Returns comprehensive unit information - **View Optimization**: Use viewId to limit returned fields for better performance - **Caching**: Consider caching unit details for frequently accessed units - **Real-time Data**: Always returns current unit state
* @summary Get a specific unit by unitId
* @param {number} unitId The unique identifier of the unit
* @param {number} [viewId] The ID of the view to use for retrieving the repository
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerGetUnitV4Raw(requestParameters: V4UnitsControllerGetUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsGetUnitResponseDto>>;
/**
* # GET /v4/units/{unitId} ## Overview Retrieves detailed information for a specific unit by its unique unit ID. This endpoint returns comprehensive unit data including rental information, appliance details, utilities configuration, and market data. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `unitId` | number | Yes | The unique identifier of the unit to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection | ## Access Control - **Organization Scope**: Unit must belong to the user\'s organization - **Unit Ownership**: Only units within the organization can be accessed - **Data Privacy**: Unit data is isolated between organizations ## View Integration When a `viewId` is provided: - **Column Selection**: Only columns specified in the view are returned - **Consistent Structure**: Same view produces consistent response structure - **Performance**: Limiting columns can improve response time and size ## Response Structure The response contains detailed unit information including rental, appliance, and operational data. ## Use Cases This endpoint is ideal for: - **Unit Detail Pages**: Display comprehensive unit information - **Property Management**: Access operational details and configurations - **Rental Analysis**: View rental metrics and market comparisons - **Maintenance Planning**: Access appliance details and conditions - **Data Export**: Retrieve complete unit data for external systems ## Data Categories The unit data includes several categories: - **Basic Information**: Unit ID, name, bedrooms, bathrooms - **Rental Data**: Rent amounts, overrides, and status information - **Utilities Information**: Tenant and Simply utility responsibilities - **Access Details**: Access methods and codes for the unit - **Appliance Information**: Details about refrigerator, stove, HVAC, microwave - **Market Data**: Rent comparisons and market analysis - **HCV Information**: Housing Choice Voucher related data ## Performance Considerations - **Complete Data**: Returns comprehensive unit information - **View Optimization**: Use viewId to limit returned fields for better performance - **Caching**: Consider caching unit details for frequently accessed units - **Real-time Data**: Always returns current unit state
* Get a specific unit by unitId
*/
v4UnitsControllerGetUnitV4(requestParameters: V4UnitsControllerGetUnitV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsGetUnitResponseDto>;
/**
* # GET /v4/units/filteredBy/{column}/{value} ## Overview Retrieves units filtered by a specific column and value combination. This endpoint allows you to filter units based on any unit field with customizable filter operations, optional view configurations, and pagination support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The unit column/field to filter by (e.g., \"bathrooms\", \"bedrooms\", \"name\", \"propertyId\") | | `value` | string | Yes | The value to filter the column by (e.g., \"2\", \"1\", \"Unit A\", \"property123\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `filterOperation` | string | No | Filter operation to apply (default: \"is\"). Options: is, isNot, contains, startsWith, endsWith, greaterThan, lessThan, etc. | | `viewId` | number | No | Optional view ID to apply additional filters, sorts, and column selections | | `columns` | string | No | Specific columns to return, formatted as \"column1&column2&column3\" | | `limit` | number | No | Maximum number of units to return (default: 20, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | | `countOnly` | boolean | No | Whether to return only the count of matching units instead of the full objects | ## Filter Operations The `filterOperation` parameter supports different operations based on data type: ### String Operations - **is**: Exact match (default) - **isNot**: Not equal to - **contains**: Contains substring - **startsWith**: Starts with value - **endsWith**: Ends with value ### Number Operations - **is**: Exact match - **isNot**: Not equal to - **greaterThan**: Greater than value - **lessThan**: Less than value - **greaterThanOrEqual**: Greater than or equal to value - **lessThanOrEqual**: Less than or equal to value ### Boolean Operations - **is**: Exact match - **isNot**: Opposite value ### Array Operations - **contains**: Array contains value - **doesNotContain**: Array does not contain value ## Access Control - **Organization Scope**: Units are automatically filtered by organization - **Unit Ownership**: Only units within the organization can be accessed - **Data Privacy**: Unit data is isolated between organizations ## View Integration When a `viewId` is provided: - **Additional Filters**: View filters are combined with the column/value filter - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections override the columns parameter - **Validation**: View must exist and belong to the authenticated user ## Response Structure The response contains an array of unit objects matching the filter criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Unit Search**: Filter units by specific criteria (bathrooms, bedrooms, property) - **Dynamic Filtering**: Build custom search interfaces with user-defined filters - **Data Analysis**: Query units matching specific characteristics - **Report Generation**: Extract subsets of units for reporting - **Integration**: Provide filtered unit data to external systems ## Examples ### Filter by Bathrooms `GET /v4/units/filteredBy/bathrooms/2` ### Filter by Bedrooms with Greater Than Operation `GET /v4/units/filteredBy/bedrooms/1?filterOperation=greaterThan` ### Filter by Property ID with View and Pagination `GET /v4/units/filteredBy/propertyId/property123?viewId=view456&limit=50&offset=0` ### Count Only Results `GET /v4/units/filteredBy/name/Unit?filterOperation=contains&countOnly=true` ## Performance Considerations - **Index Usage**: Filtering on indexed columns improves query performance - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views or columns parameter for better performance ## Integration Patterns **Basic Filtering:** - Simple column/value filtering with default \"is\" operation - Useful for dropdown-based filters and category selection **Advanced Filtering:** - Combine with filter operations for complex queries - Use with views for consistent, reusable filter combinations **Search Interfaces:** - Build dynamic search forms where users select columns and values - Support multiple filter operations for flexible searching
* @summary Get units filtered by a specific column and value
* @param {string} column The name of the column
* @param {string} value The value to filter or query by
* @param {number} [viewId] The ID of the view to use for retrieving the repository
* @param {string} [columns] The columns to select from the object
* @param {number} [limit] The maximum number of objects to return
* @param {number} [offset] The offset for pagination, used to skip a number of objects
* @param {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves
* @param {'contains' | 'does not contain' | 'is' | 'is not' | 'is any of' | 'is none of' | '=' | '!=' | '>' | '<' | '>=' | '<=' | 'contains all of' | 'contains any of' | 'contains none of' | 'is empty' | 'is not empty' | 'is before' | 'is after' | 'is on or before' | 'is on or after' | 'is between'} [filterOperation] Filters to apply to the view - Operation must be one of the following: + For string: contains, does not contain, is, is not, is any of, is none of + For number: =, !=, >, <, >=, <=, is any of, is none of + For array: contains all of, contains any of, contains none of, is empty, is not empty + For boolean: is + For date: is, is not, is before, is after, is on or before, is on or after, is between, is any of, is none of
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerGetUnitsFilteredByV4Raw(requestParameters: V4UnitsControllerGetUnitsFilteredByV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsGetUnitsFilteredByResponseDto>>;
/**
* # GET /v4/units/filteredBy/{column}/{value} ## Overview Retrieves units filtered by a specific column and value combination. This endpoint allows you to filter units based on any unit field with customizable filter operations, optional view configurations, and pagination support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The unit column/field to filter by (e.g., \"bathrooms\", \"bedrooms\", \"name\", \"propertyId\") | | `value` | string | Yes | The value to filter the column by (e.g., \"2\", \"1\", \"Unit A\", \"property123\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `filterOperation` | string | No | Filter operation to apply (default: \"is\"). Options: is, isNot, contains, startsWith, endsWith, greaterThan, lessThan, etc. | | `viewId` | number | No | Optional view ID to apply additional filters, sorts, and column selections | | `columns` | string | No | Specific columns to return, formatted as \"column1&column2&column3\" | | `limit` | number | No | Maximum number of units to return (default: 20, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | | `countOnly` | boolean | No | Whether to return only the count of matching units instead of the full objects | ## Filter Operations The `filterOperation` parameter supports different operations based on data type: ### String Operations - **is**: Exact match (default) - **isNot**: Not equal to - **contains**: Contains substring - **startsWith**: Starts with value - **endsWith**: Ends with value ### Number Operations - **is**: Exact match - **isNot**: Not equal to - **greaterThan**: Greater than value - **lessThan**: Less than value - **greaterThanOrEqual**: Greater than or equal to value - **lessThanOrEqual**: Less than or equal to value ### Boolean Operations - **is**: Exact match - **isNot**: Opposite value ### Array Operations - **contains**: Array contains value - **doesNotContain**: Array does not contain value ## Access Control - **Organization Scope**: Units are automatically filtered by organization - **Unit Ownership**: Only units within the organization can be accessed - **Data Privacy**: Unit data is isolated between organizations ## View Integration When a `viewId` is provided: - **Additional Filters**: View filters are combined with the column/value filter - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections override the columns parameter - **Validation**: View must exist and belong to the authenticated user ## Response Structure The response contains an array of unit objects matching the filter criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Unit Search**: Filter units by specific criteria (bathrooms, bedrooms, property) - **Dynamic Filtering**: Build custom search interfaces with user-defined filters - **Data Analysis**: Query units matching specific characteristics - **Report Generation**: Extract subsets of units for reporting - **Integration**: Provide filtered unit data to external systems ## Examples ### Filter by Bathrooms `GET /v4/units/filteredBy/bathrooms/2` ### Filter by Bedrooms with Greater Than Operation `GET /v4/units/filteredBy/bedrooms/1?filterOperation=greaterThan` ### Filter by Property ID with View and Pagination `GET /v4/units/filteredBy/propertyId/property123?viewId=view456&limit=50&offset=0` ### Count Only Results `GET /v4/units/filteredBy/name/Unit?filterOperation=contains&countOnly=true` ## Performance Considerations - **Index Usage**: Filtering on indexed columns improves query performance - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views or columns parameter for better performance ## Integration Patterns **Basic Filtering:** - Simple column/value filtering with default \"is\" operation - Useful for dropdown-based filters and category selection **Advanced Filtering:** - Combine with filter operations for complex queries - Use with views for consistent, reusable filter combinations **Search Interfaces:** - Build dynamic search forms where users select columns and values - Support multiple filter operations for flexible searching
* Get units filtered by a specific column and value
*/
v4UnitsControllerGetUnitsFilteredByV4(requestParameters: V4UnitsControllerGetUnitsFilteredByV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsGetUnitsFilteredByResponseDto>;
/**
* # GET /v4/units/viewId/{viewId} ## Overview Retrieves units filtered by a specific view configuration. This endpoint applies the filters, sorts, and column selections defined in the specified view to return a customized dataset of units. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `limit` | number | No | Maximum number of units to return (default: 10, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the unit dataset - **Sorts**: View sort criteria determine the order of returned units - **Columns**: View column selection determines which fields are returned - **Validation**: View must exist and belong to the authenticated user ## Access Control - **User Ownership**: Only views created by the authenticated user can be used - **Organization Scope**: Units are automatically filtered by organization - **View Validation**: Invalid or non-existent views will return an error ## Response Structure The response contains units matching the view criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Saved Searches**: Quickly access frequently used unit filters - **Custom Dashboards**: Display units using predefined view configurations - **Report Generation**: Generate consistent reports using saved view criteria - **User Workflows**: Provide quick access to personalized unit subsets - **Data Analysis**: Apply complex filter combinations saved in views ## Performance Benefits Using views provides several performance advantages: - **Pre-validated Filters**: View filters are validated once during creation - **Consistent Queries**: Same view produces optimized, consistent database queries - **Reduced Complexity**: Complex filter logic is encapsulated in the view - **Caching Opportunities**: Results can be cached based on view configuration ## Pagination Standard pagination is supported: - **Consistent Results**: Pagination maintains view filter consistency - **Stable Ordering**: View sort configuration ensures stable result ordering - **Performance**: Large filtered datasets benefit from pagination
* @summary Get units with a specific viewId
* @param {number} viewId The unique identifier of the view
* @param {number} [limit] The maximum number of objects to return
* @param {number} [offset] The offset for pagination, used to skip a number of objects
* @param {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerGetUnitsInViewV4Raw(requestParameters: V4UnitsControllerGetUnitsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsGetUnitsInViewResponseDto>>;
/**
* # GET /v4/units/viewId/{viewId} ## Overview Retrieves units filtered by a specific view configuration. This endpoint applies the filters, sorts, and column selections defined in the specified view to return a customized dataset of units. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | Yes | The unique identifier of the view to apply | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `limit` | number | No | Maximum number of units to return (default: 10, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the unit dataset - **Sorts**: View sort criteria determine the order of returned units - **Columns**: View column selection determines which fields are returned - **Validation**: View must exist and belong to the authenticated user ## Access Control - **User Ownership**: Only views created by the authenticated user can be used - **Organization Scope**: Units are automatically filtered by organization - **View Validation**: Invalid or non-existent views will return an error ## Response Structure The response contains units matching the view criteria with pagination metadata. ## Use Cases This endpoint is ideal for: - **Saved Searches**: Quickly access frequently used unit filters - **Custom Dashboards**: Display units using predefined view configurations - **Report Generation**: Generate consistent reports using saved view criteria - **User Workflows**: Provide quick access to personalized unit subsets - **Data Analysis**: Apply complex filter combinations saved in views ## Performance Benefits Using views provides several performance advantages: - **Pre-validated Filters**: View filters are validated once during creation - **Consistent Queries**: Same view produces optimized, consistent database queries - **Reduced Complexity**: Complex filter logic is encapsulated in the view - **Caching Opportunities**: Results can be cached based on view configuration ## Pagination Standard pagination is supported: - **Consistent Results**: Pagination maintains view filter consistency - **Stable Ordering**: View sort configuration ensures stable result ordering - **Performance**: Large filtered datasets benefit from pagination
* Get units with a specific viewId
*/
v4UnitsControllerGetUnitsInViewV4(requestParameters: V4UnitsControllerGetUnitsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4UnitsGetUnitsInViewResponseDto>;
/**
* # GET /v4/units ## Overview Retrieves a list of units with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query units using view configurations or direct parameters to get customized unit datasets. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply filters, sorts, and column selections | | `limit` | number | No | Maximum number of units to return (default: 10, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | ### View Integration When a `viewId` is provided: - **Filters**: View filters are automatically applied to the query - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections determine returned fields - **Validation**: View must exist and belong to the authenticated user ### Pagination The endpoint supports offset-based pagination: - **Default Limit**: 10 units per request - **Maximum Limit**: 100 units per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of unit objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building unit listing interfaces - Implementing unit search and filtering - Creating unit dashboards and analytics - Generating unit reports and exports - Providing unit data for mobile applications ## Performance Considerations - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views for better performance - **Caching**: Consider implementing client-side caching for frequently accessed data ## Integration Patterns **Standard Listing:** - No viewId: Returns all organization units with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns units matching view criteria - Consistent Results: Same view always returns same filtered dataset - User Personalization: Each user can have custom views for different purposes
* @summary Get units with optional viewId
* @param {number} [viewId] The ID of the view to filter the units
* @param {number} [limit] The maximum number of objects to return
* @param {number} [offset] The offset for pagination, used to skip a number of objects
* @param {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UnitsAPIV4ApiInterface
*/
v4UnitsControllerGetUnitsV4Raw(requestParameters: V4UnitsControllerGetUnitsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4UnitsGetUnitsResponseDto>>;
/**
* # GET /v4/units ## Overview Retrieves a list of units with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query units using view configurations or direct parameters to get customized unit datasets. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply filters, sorts, and column selections | | `limit` | number | No | Maximum number of units to return (default: 10, max: 100) | | `offset` | number | No | Number of units to skip for pagination (default: 0) | ### View Integration When a `viewId` is provided: - **Filters**: View filters are automatically applied to the query - **Sorts**: View sort configurations determine result ordering - **Columns**: View column selections determine returned fields - **Validation**: View must exist and belong to the authenticated user ### Pagination The endpoint supports offset-based pagination: - **Default Limit**: 10 units per request - **Maximum Limit**: 100 units per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of unit objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building unit listing interfaces - Implementing unit search and filtering - Creating unit dashboards and analytics - Generating unit reports and exports - Providing unit data for mobile applications ## Performance Considerations - **Pagination**: Use appropriate limit values to balance performance and data needs - **View Optimization**: Well-designed views with targeted filters improve response times - **Column Selection**: Limit returned columns through views for better performance - **Caching**: Consider implementing client-side caching for frequently accessed data ## Integration Patterns **Standard Listing:** - No viewId: Returns all organization units with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns units matching view criteria - Consistent Results: Same view always returns same filtered dataset - User Personalization: Each user can have custom views for different purposes
* Get units with opti