UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

267 lines 42.4 kB
/** * 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 { V4InspectionsCreateInspectionBodyDto, V4InspectionsCreateInspectionResponseDto, V4InspectionsDeleteInspectionResponseDto, V4InspectionsGetInspectionColumnsResponseDto, V4InspectionsGetInspectionResponseDto, V4InspectionsGetInspectionsInViewResponseDto, V4InspectionsGetInspectionsResponseDto, V4InspectionsGetUniqueValuesResponseDto, V4InspectionsUpdateInspectionBodyDto, V4InspectionsUpdateInspectionResponseDto } from '../models/index'; export interface V4InspectionsControllerCreateInspectionV4Request { v4InspectionsCreateInspectionBodyDto: V4InspectionsCreateInspectionBodyDto; } export interface V4InspectionsControllerDeleteInspectionV4Request { inspectionId: number; } export interface V4InspectionsControllerGetInspectionColumnsV4Request { inspectionId: number; columns: string; } export interface V4InspectionsControllerGetInspectionV4Request { inspectionId: number; viewId?: number; } export interface V4InspectionsControllerGetInspectionsInViewV4Request { viewId: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4InspectionsControllerGetInspectionsV4Request { viewId?: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4InspectionsControllerGetUniqueValuesV4Request { column: string; viewId?: number; limit?: number; offset?: number; } export interface V4InspectionsControllerUpdateInspectionV4Request { inspectionId: number; v4InspectionsUpdateInspectionBodyDto: V4InspectionsUpdateInspectionBodyDto; } /** * InspectionsAPIV4Api - interface * * @export * @interface InspectionsAPIV4ApiInterface */ export interface InspectionsAPIV4ApiInterface { /** * Create a new inspection record in the system * @summary Create a new inspection * @param {V4InspectionsCreateInspectionBodyDto} v4InspectionsCreateInspectionBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerCreateInspectionV4Raw(requestParameters: V4InspectionsControllerCreateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsCreateInspectionResponseDto>>; /** * Create a new inspection record in the system * Create a new inspection */ v4InspectionsControllerCreateInspectionV4(requestParameters: V4InspectionsControllerCreateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsCreateInspectionResponseDto>; /** * Remove an inspection record from the system * @summary Delete a specific inspection by inspectionId * @param {number} inspectionId The unique identifier of the inspection * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerDeleteInspectionV4Raw(requestParameters: V4InspectionsControllerDeleteInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsDeleteInspectionResponseDto>>; /** * Remove an inspection record from the system * Delete a specific inspection by inspectionId */ v4InspectionsControllerDeleteInspectionV4(requestParameters: V4InspectionsControllerDeleteInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsDeleteInspectionResponseDto>; /** * Retrieve only specified columns of an inspection for optimized data transfer * @summary Get specific columns of an inspection by inspectionId * @param {number} inspectionId The unique identifier of the inspection * @param {string} columns Comma-separated list of column names * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerGetInspectionColumnsV4Raw(requestParameters: V4InspectionsControllerGetInspectionColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionColumnsResponseDto>>; /** * Retrieve only specified columns of an inspection for optimized data transfer * Get specific columns of an inspection by inspectionId */ v4InspectionsControllerGetInspectionColumnsV4(requestParameters: V4InspectionsControllerGetInspectionColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionColumnsResponseDto>; /** * Retrieve detailed information about a specific inspection * @summary Get a specific inspection by inspectionId * @param {number} inspectionId The unique identifier of the inspection * @param {number} [viewId] The ID of the view to use for retrieving the repository * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerGetInspectionV4Raw(requestParameters: V4InspectionsControllerGetInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionResponseDto>>; /** * Retrieve detailed information about a specific inspection * Get a specific inspection by inspectionId */ v4InspectionsControllerGetInspectionV4(requestParameters: V4InspectionsControllerGetInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionResponseDto>; /** * Retrieve inspections filtered by a specific view configuration * @summary Get inspections 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 InspectionsAPIV4ApiInterface */ v4InspectionsControllerGetInspectionsInViewV4Raw(requestParameters: V4InspectionsControllerGetInspectionsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionsInViewResponseDto>>; /** * Retrieve inspections filtered by a specific view configuration * Get inspections with a specific viewId */ v4InspectionsControllerGetInspectionsInViewV4(requestParameters: V4InspectionsControllerGetInspectionsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionsInViewResponseDto>; /** * # GET /v4/inspections ## Overview Retrieves a list of inspections with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query inspections using view configurations or direct parameters to get customized inspection 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 inspections to return (default: 10, max: 100) | | `offset` | number | No | Number of inspections 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 inspections per request - **Maximum Limit**: 100 inspections per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of inspection objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building inspection listing interfaces - Implementing inspection search and filtering - Creating inspection dashboards and analytics - Generating inspection reports and exports - Managing inspection workflows and tracking - Monitoring property inspection schedules ## 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 inspections with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns inspections 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 inspections with optional viewId * @param {number} [viewId] The ID of the view to filter the inspections * @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 InspectionsAPIV4ApiInterface */ v4InspectionsControllerGetInspectionsV4Raw(requestParameters: V4InspectionsControllerGetInspectionsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionsResponseDto>>; /** * # GET /v4/inspections ## Overview Retrieves a list of inspections with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query inspections using view configurations or direct parameters to get customized inspection 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 inspections to return (default: 10, max: 100) | | `offset` | number | No | Number of inspections 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 inspections per request - **Maximum Limit**: 100 inspections per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of inspection objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building inspection listing interfaces - Implementing inspection search and filtering - Creating inspection dashboards and analytics - Generating inspection reports and exports - Managing inspection workflows and tracking - Monitoring property inspection schedules ## 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 inspections with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns inspections matching view criteria - Consistent Results: Same view always returns same filtered dataset - User Personalization: Each user can have custom views for different purposes * Get inspections with optional viewId */ v4InspectionsControllerGetInspectionsV4(requestParameters: V4InspectionsControllerGetInspectionsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionsResponseDto>; /** * # GET /v4/inspections/unique/{column} ## Overview Retrieves all unique values for a specified inspection column along with the count of inspections having each value. This endpoint is ideal for building filter dropdowns, analytics dashboards, and understanding data distribution across inspection fields. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The inspection column/field to get unique values from (e.g., \"status\", \"inspectionType\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply view filters before calculating unique values (only inspections matching the view criteria will be considered) | | `limit` | number | No | Maximum number of unique values to return (default: 100, max: 1000) | | `offset` | number | No | Number of unique values to skip for pagination (default: 0) | ## Supported Columns The endpoint supports any valid inspection column, including but not limited to: ### Status and Type - **status**: Inspection status (Scheduled, Completed, Cancelled, etc.) - **inspectionType**: Type of inspection performed ### Financial Fields - **inspectionCost**: Cost of the inspection ### Dates - **inspectionDate**: Date the inspection was performed or scheduled ## View Integration When a `viewId` is provided: - **Pre-filtering**: View filters are applied before calculating unique values - **Scoped Results**: Only inspections matching the view criteria are considered - **Consistent Data**: Results align with inspections visible in the specified view - **Dynamic Analysis**: Unique values reflect the filtered dataset, not all inspections ## Access Control - **Organization Scope**: Unique values are automatically filtered by organization - **Inspection Ownership**: Only inspections within the organization are considered - **Data Privacy**: Results are isolated between organizations - **View Authorization**: View access is validated before applying view filters ## Response Structure The response contains unique values with their counts, total count, and the queried column name. ## Use Cases This endpoint is ideal for: - **Filter Dropdowns**: Populate dropdown menus with available filter options - **Data Analytics**: Understand distribution of values across inspection portfolio - **Dashboard Widgets**: Display counts and statistics for different inspection categories - **Validation**: Check available values before filtering or updating inspections - **Report Generation**: Generate summaries and breakdowns by inspection attributes ## Examples ### Get Inspection Statuses `GET /v4/inspections/unique/status` ### Get Inspection Types `GET /v4/inspections/unique/inspectionType` ### Get Statuses with View Filter `GET /v4/inspections/unique/status?viewId=12345` ## Performance Considerations - **Index Usage**: Queries on indexed columns (status, inspectionType) perform better - **Result Size**: Use pagination for columns with many unique values - **Data Types**: Numeric columns may return many unique values; consider grouping - **Organization Filtering**: Automatic organization scoping ensures optimal performance ## Integration Patterns **Filter Interfaces:** - Use results to populate filter dropdown options - Show counts to help users understand data availability - Implement dynamic filtering based on available values **Analytics Dashboards:** - Display distribution charts using value counts - Create summary statistics for inspection portfolios - Build interactive data exploration tools **Data Validation:** - Verify valid values before inspection updates - Check data consistency across inspection records - Validate import data against existing values * @summary Get unique values for a specific inspection column with counts * @param {string} column The name of the column to get unique values for * @param {number} [viewId] The ID of the view to use for retrieving the repository * @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 {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerGetUniqueValuesV4Raw(requestParameters: V4InspectionsControllerGetUniqueValuesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetUniqueValuesResponseDto>>; /** * # GET /v4/inspections/unique/{column} ## Overview Retrieves all unique values for a specified inspection column along with the count of inspections having each value. This endpoint is ideal for building filter dropdowns, analytics dashboards, and understanding data distribution across inspection fields. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The inspection column/field to get unique values from (e.g., \"status\", \"inspectionType\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply view filters before calculating unique values (only inspections matching the view criteria will be considered) | | `limit` | number | No | Maximum number of unique values to return (default: 100, max: 1000) | | `offset` | number | No | Number of unique values to skip for pagination (default: 0) | ## Supported Columns The endpoint supports any valid inspection column, including but not limited to: ### Status and Type - **status**: Inspection status (Scheduled, Completed, Cancelled, etc.) - **inspectionType**: Type of inspection performed ### Financial Fields - **inspectionCost**: Cost of the inspection ### Dates - **inspectionDate**: Date the inspection was performed or scheduled ## View Integration When a `viewId` is provided: - **Pre-filtering**: View filters are applied before calculating unique values - **Scoped Results**: Only inspections matching the view criteria are considered - **Consistent Data**: Results align with inspections visible in the specified view - **Dynamic Analysis**: Unique values reflect the filtered dataset, not all inspections ## Access Control - **Organization Scope**: Unique values are automatically filtered by organization - **Inspection Ownership**: Only inspections within the organization are considered - **Data Privacy**: Results are isolated between organizations - **View Authorization**: View access is validated before applying view filters ## Response Structure The response contains unique values with their counts, total count, and the queried column name. ## Use Cases This endpoint is ideal for: - **Filter Dropdowns**: Populate dropdown menus with available filter options - **Data Analytics**: Understand distribution of values across inspection portfolio - **Dashboard Widgets**: Display counts and statistics for different inspection categories - **Validation**: Check available values before filtering or updating inspections - **Report Generation**: Generate summaries and breakdowns by inspection attributes ## Examples ### Get Inspection Statuses `GET /v4/inspections/unique/status` ### Get Inspection Types `GET /v4/inspections/unique/inspectionType` ### Get Statuses with View Filter `GET /v4/inspections/unique/status?viewId=12345` ## Performance Considerations - **Index Usage**: Queries on indexed columns (status, inspectionType) perform better - **Result Size**: Use pagination for columns with many unique values - **Data Types**: Numeric columns may return many unique values; consider grouping - **Organization Filtering**: Automatic organization scoping ensures optimal performance ## Integration Patterns **Filter Interfaces:** - Use results to populate filter dropdown options - Show counts to help users understand data availability - Implement dynamic filtering based on available values **Analytics Dashboards:** - Display distribution charts using value counts - Create summary statistics for inspection portfolios - Build interactive data exploration tools **Data Validation:** - Verify valid values before inspection updates - Check data consistency across inspection records - Validate import data against existing values * Get unique values for a specific inspection column with counts */ v4InspectionsControllerGetUniqueValuesV4(requestParameters: V4InspectionsControllerGetUniqueValuesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetUniqueValuesResponseDto>; /** * Update an existing inspection record with new data * @summary Update a specific inspection by inspectionId * @param {number} inspectionId The unique identifier of the inspection * @param {V4InspectionsUpdateInspectionBodyDto} v4InspectionsUpdateInspectionBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof InspectionsAPIV4ApiInterface */ v4InspectionsControllerUpdateInspectionV4Raw(requestParameters: V4InspectionsControllerUpdateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsUpdateInspectionResponseDto>>; /** * Update an existing inspection record with new data * Update a specific inspection by inspectionId */ v4InspectionsControllerUpdateInspectionV4(requestParameters: V4InspectionsControllerUpdateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsUpdateInspectionResponseDto>; } /** * */ export declare class InspectionsAPIV4Api extends runtime.BaseAPI implements InspectionsAPIV4ApiInterface { /** * Create a new inspection record in the system * Create a new inspection */ v4InspectionsControllerCreateInspectionV4Raw(requestParameters: V4InspectionsControllerCreateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsCreateInspectionResponseDto>>; /** * Create a new inspection record in the system * Create a new inspection */ v4InspectionsControllerCreateInspectionV4(requestParameters: V4InspectionsControllerCreateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsCreateInspectionResponseDto>; /** * Remove an inspection record from the system * Delete a specific inspection by inspectionId */ v4InspectionsControllerDeleteInspectionV4Raw(requestParameters: V4InspectionsControllerDeleteInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsDeleteInspectionResponseDto>>; /** * Remove an inspection record from the system * Delete a specific inspection by inspectionId */ v4InspectionsControllerDeleteInspectionV4(requestParameters: V4InspectionsControllerDeleteInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsDeleteInspectionResponseDto>; /** * Retrieve only specified columns of an inspection for optimized data transfer * Get specific columns of an inspection by inspectionId */ v4InspectionsControllerGetInspectionColumnsV4Raw(requestParameters: V4InspectionsControllerGetInspectionColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionColumnsResponseDto>>; /** * Retrieve only specified columns of an inspection for optimized data transfer * Get specific columns of an inspection by inspectionId */ v4InspectionsControllerGetInspectionColumnsV4(requestParameters: V4InspectionsControllerGetInspectionColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionColumnsResponseDto>; /** * Retrieve detailed information about a specific inspection * Get a specific inspection by inspectionId */ v4InspectionsControllerGetInspectionV4Raw(requestParameters: V4InspectionsControllerGetInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionResponseDto>>; /** * Retrieve detailed information about a specific inspection * Get a specific inspection by inspectionId */ v4InspectionsControllerGetInspectionV4(requestParameters: V4InspectionsControllerGetInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionResponseDto>; /** * Retrieve inspections filtered by a specific view configuration * Get inspections with a specific viewId */ v4InspectionsControllerGetInspectionsInViewV4Raw(requestParameters: V4InspectionsControllerGetInspectionsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionsInViewResponseDto>>; /** * Retrieve inspections filtered by a specific view configuration * Get inspections with a specific viewId */ v4InspectionsControllerGetInspectionsInViewV4(requestParameters: V4InspectionsControllerGetInspectionsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionsInViewResponseDto>; /** * # GET /v4/inspections ## Overview Retrieves a list of inspections with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query inspections using view configurations or direct parameters to get customized inspection 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 inspections to return (default: 10, max: 100) | | `offset` | number | No | Number of inspections 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 inspections per request - **Maximum Limit**: 100 inspections per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of inspection objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building inspection listing interfaces - Implementing inspection search and filtering - Creating inspection dashboards and analytics - Generating inspection reports and exports - Managing inspection workflows and tracking - Monitoring property inspection schedules ## 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 inspections with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns inspections matching view criteria - Consistent Results: Same view always returns same filtered dataset - User Personalization: Each user can have custom views for different purposes * Get inspections with optional viewId */ v4InspectionsControllerGetInspectionsV4Raw(requestParameters: V4InspectionsControllerGetInspectionsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetInspectionsResponseDto>>; /** * # GET /v4/inspections ## Overview Retrieves a list of inspections with optional filtering, sorting, and pagination capabilities. This endpoint allows you to query inspections using view configurations or direct parameters to get customized inspection 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 inspections to return (default: 10, max: 100) | | `offset` | number | No | Number of inspections 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 inspections per request - **Maximum Limit**: 100 inspections per request - **Offset Calculation**: Use `offset = page * limit` for page-based pagination ## Response Structure The response contains an array of inspection objects with pagination metadata. ## Use Cases This endpoint is ideal for: - Building inspection listing interfaces - Implementing inspection search and filtering - Creating inspection dashboards and analytics - Generating inspection reports and exports - Managing inspection workflows and tracking - Monitoring property inspection schedules ## 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 inspections with default columns - Basic pagination: Use limit/offset for page navigation **Filtered Views:** - With viewId: Returns inspections matching view criteria - Consistent Results: Same view always returns same filtered dataset - User Personalization: Each user can have custom views for different purposes * Get inspections with optional viewId */ v4InspectionsControllerGetInspectionsV4(requestParameters?: V4InspectionsControllerGetInspectionsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetInspectionsResponseDto>; /** * # GET /v4/inspections/unique/{column} ## Overview Retrieves all unique values for a specified inspection column along with the count of inspections having each value. This endpoint is ideal for building filter dropdowns, analytics dashboards, and understanding data distribution across inspection fields. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The inspection column/field to get unique values from (e.g., \"status\", \"inspectionType\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply view filters before calculating unique values (only inspections matching the view criteria will be considered) | | `limit` | number | No | Maximum number of unique values to return (default: 100, max: 1000) | | `offset` | number | No | Number of unique values to skip for pagination (default: 0) | ## Supported Columns The endpoint supports any valid inspection column, including but not limited to: ### Status and Type - **status**: Inspection status (Scheduled, Completed, Cancelled, etc.) - **inspectionType**: Type of inspection performed ### Financial Fields - **inspectionCost**: Cost of the inspection ### Dates - **inspectionDate**: Date the inspection was performed or scheduled ## View Integration When a `viewId` is provided: - **Pre-filtering**: View filters are applied before calculating unique values - **Scoped Results**: Only inspections matching the view criteria are considered - **Consistent Data**: Results align with inspections visible in the specified view - **Dynamic Analysis**: Unique values reflect the filtered dataset, not all inspections ## Access Control - **Organization Scope**: Unique values are automatically filtered by organization - **Inspection Ownership**: Only inspections within the organization are considered - **Data Privacy**: Results are isolated between organizations - **View Authorization**: View access is validated before applying view filters ## Response Structure The response contains unique values with their counts, total count, and the queried column name. ## Use Cases This endpoint is ideal for: - **Filter Dropdowns**: Populate dropdown menus with available filter options - **Data Analytics**: Understand distribution of values across inspection portfolio - **Dashboard Widgets**: Display counts and statistics for different inspection categories - **Validation**: Check available values before filtering or updating inspections - **Report Generation**: Generate summaries and breakdowns by inspection attributes ## Examples ### Get Inspection Statuses `GET /v4/inspections/unique/status` ### Get Inspection Types `GET /v4/inspections/unique/inspectionType` ### Get Statuses with View Filter `GET /v4/inspections/unique/status?viewId=12345` ## Performance Considerations - **Index Usage**: Queries on indexed columns (status, inspectionType) perform better - **Result Size**: Use pagination for columns with many unique values - **Data Types**: Numeric columns may return many unique values; consider grouping - **Organization Filtering**: Automatic organization scoping ensures optimal performance ## Integration Patterns **Filter Interfaces:** - Use results to populate filter dropdown options - Show counts to help users understand data availability - Implement dynamic filtering based on available values **Analytics Dashboards:** - Display distribution charts using value counts - Create summary statistics for inspection portfolios - Build interactive data exploration tools **Data Validation:** - Verify valid values before inspection updates - Check data consistency across inspection records - Validate import data against existing values * Get unique values for a specific inspection column with counts */ v4InspectionsControllerGetUniqueValuesV4Raw(requestParameters: V4InspectionsControllerGetUniqueValuesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsGetUniqueValuesResponseDto>>; /** * # GET /v4/inspections/unique/{column} ## Overview Retrieves all unique values for a specified inspection column along with the count of inspections having each value. This endpoint is ideal for building filter dropdowns, analytics dashboards, and understanding data distribution across inspection fields. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `column` | string | Yes | The inspection column/field to get unique values from (e.g., \"status\", \"inspectionType\") | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply view filters before calculating unique values (only inspections matching the view criteria will be considered) | | `limit` | number | No | Maximum number of unique values to return (default: 100, max: 1000) | | `offset` | number | No | Number of unique values to skip for pagination (default: 0) | ## Supported Columns The endpoint supports any valid inspection column, including but not limited to: ### Status and Type - **status**: Inspection status (Scheduled, Completed, Cancelled, etc.) - **inspectionType**: Type of inspection performed ### Financial Fields - **inspectionCost**: Cost of the inspection ### Dates - **inspectionDate**: Date the inspection was performed or scheduled ## View Integration When a `viewId` is provided: - **Pre-filtering**: View filters are applied before calculating unique values - **Scoped Results**: Only inspections matching the view criteria are considered - **Consistent Data**: Results align with inspections visible in the specified view - **Dynamic Analysis**: Unique values reflect the filtered dataset, not all inspections ## Access Control - **Organization Scope**: Unique values are automatically filtered by organization - **Inspection Ownership**: Only inspections within the organization are considered - **Data Privacy**: Results are isolated between organizations - **View Authorization**: View access is validated before applying view filters ## Response Structure The response contains unique values with their counts, total count, and the queried column name. ## Use Cases This endpoint is ideal for: - **Filter Dropdowns**: Populate dropdown menus with available filter options - **Data Analytics**: Understand distribution of values across inspection portfolio - **Dashboard Widgets**: Display counts and statistics for different inspection categories - **Validation**: Check available values before filtering or updating inspections - **Report Generation**: Generate summaries and breakdowns by inspection attributes ## Examples ### Get Inspection Statuses `GET /v4/inspections/unique/status` ### Get Inspection Types `GET /v4/inspections/unique/inspectionType` ### Get Statuses with View Filter `GET /v4/inspections/unique/status?viewId=12345` ## Performance Considerations - **Index Usage**: Queries on indexed columns (status, inspectionType) perform better - **Result Size**: Use pagination for columns with many unique values - **Data Types**: Numeric columns may return many unique values; consider grouping - **Organization Filtering**: Automatic organization scoping ensures optimal performance ## Integration Patterns **Filter Interfaces:** - Use results to populate filter dropdown options - Show counts to help users understand data availability - Implement dynamic filtering based on available values **Analytics Dashboards:** - Display distribution charts using value counts - Create summary statistics for inspection portfolios - Build interactive data exploration tools **Data Validation:** - Verify valid values before inspection updates - Check data consistency across inspection records - Validate import data against existing values * Get unique values for a specific inspection column with counts */ v4InspectionsControllerGetUniqueValuesV4(requestParameters: V4InspectionsControllerGetUniqueValuesV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsGetUniqueValuesResponseDto>; /** * Update an existing inspection record with new data * Update a specific inspection by inspectionId */ v4InspectionsControllerUpdateInspectionV4Raw(requestParameters: V4InspectionsControllerUpdateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4InspectionsUpdateInspectionResponseDto>>; /** * Update an existing inspection record with new data * Update a specific inspection by inspectionId */ v4InspectionsControllerUpdateInspectionV4(requestParameters: V4InspectionsControllerUpdateInspectionV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4InspectionsUpdateInspectionResponseDto>; } //# sourceMappingURL=InspectionsAPIV4Api.d.ts.map