UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

154 lines 99.3 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 { V4ThreadsCreateThreadBodyDto, V4ThreadsCreateThreadResponseDto, V4ThreadsDeleteThreadResponseDto, V4ThreadsGetThreadColumnsResponseDto, V4ThreadsGetThreadResponseDto, V4ThreadsGetThreadsInViewResponseDto, V4ThreadsGetThreadsResponseDto, V4ThreadsUpdateThreadBodyDto, V4ThreadsUpdateThreadResponseDto } from '../models/index'; export interface V4ThreadsControllerCreateThreadV4Request { v4ThreadsCreateThreadBodyDto: V4ThreadsCreateThreadBodyDto; } export interface V4ThreadsControllerDeleteThreadV4Request { threadId: string; } export interface V4ThreadsControllerGetThreadColumnsV4Request { columns: string; threadId: string; } export interface V4ThreadsControllerGetThreadV4Request { threadId: string; viewId?: number; } export interface V4ThreadsControllerGetThreadsInViewV4Request { viewId: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4ThreadsControllerGetThreadsV4Request { viewId?: number; limit?: number; offset?: number; countOnly?: boolean; } export interface V4ThreadsControllerUpdateThreadV4Request { threadId: string; v4ThreadsUpdateThreadBodyDto: V4ThreadsUpdateThreadBodyDto; } /** * ThreadsAPIV4Api - interface * * @export * @interface ThreadsAPIV4ApiInterface */ export interface ThreadsAPIV4ApiInterface { /** * # POST /v4/threads ## Overview Creates a new conversation thread with the provided information. This endpoint allows you to start new threads for communication, lead management, property discussions, or customer support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain thread information to create the new thread. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `title` | string | Thread title or subject | | `content` | string | Initial thread content or message | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `tags` | array | Array of tags to categorize the thread | | `leadId` | number | Associated lead ID | | `propertyId` | string | Associated property ID | ### Validation Rules - **Title**: Required, non-empty string, should be descriptive - **Content**: Required, non-empty string, contains the initial message - **Tags**: Optional array of strings for categorization - **Lead ID**: Must be a valid lead ID if provided - **Property ID**: Must be a valid property ID if provided - **Organization Scoping**: Thread is automatically associated with user\'s organization ## Request Example ```json { \"title\": \"Property Viewing Request\", \"content\": \"Customer interested in viewing the downtown condo unit\", \"tags\": [\"viewing\", \"customer-inquiry\", \"downtown\"], \"leadId\": 456, \"propertyId\": \"property-789\" } ``` ## Response Structure Returns the newly created thread\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Communication Management**: Starting new conversation threads - **Lead Management**: Creating threads for lead communications - **Customer Support**: Initiating support tickets and help requests - **Property Management**: Starting conversations about specific properties - **Team Collaboration**: Creating internal discussion threads - **Workflow Management**: Initiating process-based communication ## Business Rules - **Title Requirements**: Thread titles should be clear and descriptive - **Content Requirements**: Initial content should provide context for the thread - **Association Validation**: Lead and property IDs are validated if provided - **Organization Association**: Threads are automatically scoped to the user\'s organization - **Data Validation**: All content is validated for reasonable formats - **Audit Trail**: Thread creation is logged for compliance and tracking ## Thread Categories ### Communication Threads You can create threads for various communication purposes: - **Customer Inquiries**: Customer questions and requests - **Lead Follow-up**: Sales and lead management communications - **Support Tickets**: Customer support and issue resolution - **Internal Discussions**: Team and organizational communications ### Business Entity Threads - **Property Threads**: Conversations about specific properties - **Lead Threads**: Communications related to specific leads - **Project Threads**: Discussions about projects and deals - **Vendor Threads**: Communications with vendors and partners ## Error Handling Common validation errors include: - **Missing Required Fields**: Title or content not provided - **Invalid Lead ID**: Lead does not exist or belongs to different organization - **Invalid Property ID**: Property does not exist or is not accessible - **Invalid Tags**: Tags contain invalid characters or exceed limits - **Content Too Long**: Content exceeds maximum allowed length * @summary Create a new thread * @param {V4ThreadsCreateThreadBodyDto} v4ThreadsCreateThreadBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerCreateThreadV4Raw(requestParameters: V4ThreadsControllerCreateThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsCreateThreadResponseDto>>; /** * # POST /v4/threads ## Overview Creates a new conversation thread with the provided information. This endpoint allows you to start new threads for communication, lead management, property discussions, or customer support. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Body The request body should contain thread information to create the new thread. ### Required Fields | Field | Type | Description | |-------|------|-------------| | `title` | string | Thread title or subject | | `content` | string | Initial thread content or message | ### Optional Fields | Field | Type | Description | |-------|------|-------------| | `tags` | array | Array of tags to categorize the thread | | `leadId` | number | Associated lead ID | | `propertyId` | string | Associated property ID | ### Validation Rules - **Title**: Required, non-empty string, should be descriptive - **Content**: Required, non-empty string, contains the initial message - **Tags**: Optional array of strings for categorization - **Lead ID**: Must be a valid lead ID if provided - **Property ID**: Must be a valid property ID if provided - **Organization Scoping**: Thread is automatically associated with user\'s organization ## Request Example ```json { \"title\": \"Property Viewing Request\", \"content\": \"Customer interested in viewing the downtown condo unit\", \"tags\": [\"viewing\", \"customer-inquiry\", \"downtown\"], \"leadId\": 456, \"propertyId\": \"property-789\" } ``` ## Response Structure Returns the newly created thread\'s ID and confirmation. ## Use Cases This endpoint is ideal for: - **Communication Management**: Starting new conversation threads - **Lead Management**: Creating threads for lead communications - **Customer Support**: Initiating support tickets and help requests - **Property Management**: Starting conversations about specific properties - **Team Collaboration**: Creating internal discussion threads - **Workflow Management**: Initiating process-based communication ## Business Rules - **Title Requirements**: Thread titles should be clear and descriptive - **Content Requirements**: Initial content should provide context for the thread - **Association Validation**: Lead and property IDs are validated if provided - **Organization Association**: Threads are automatically scoped to the user\'s organization - **Data Validation**: All content is validated for reasonable formats - **Audit Trail**: Thread creation is logged for compliance and tracking ## Thread Categories ### Communication Threads You can create threads for various communication purposes: - **Customer Inquiries**: Customer questions and requests - **Lead Follow-up**: Sales and lead management communications - **Support Tickets**: Customer support and issue resolution - **Internal Discussions**: Team and organizational communications ### Business Entity Threads - **Property Threads**: Conversations about specific properties - **Lead Threads**: Communications related to specific leads - **Project Threads**: Discussions about projects and deals - **Vendor Threads**: Communications with vendors and partners ## Error Handling Common validation errors include: - **Missing Required Fields**: Title or content not provided - **Invalid Lead ID**: Lead does not exist or belongs to different organization - **Invalid Property ID**: Property does not exist or is not accessible - **Invalid Tags**: Tags contain invalid characters or exceed limits - **Content Too Long**: Content exceeds maximum allowed length * Create a new thread */ v4ThreadsControllerCreateThreadV4(requestParameters: V4ThreadsControllerCreateThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsCreateThreadResponseDto>; /** * # DELETE /v4/threads/{threadId} ## Overview Deletes an existing conversation thread from the system. This is a permanent operation that removes the thread and handles all associated data relationships appropriately. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to delete | ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Thread is permanently deleted from the system - **Cascade Handling**: Associated relationships and references are handled appropriately - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes - **Data Integrity**: System ensures referential integrity during deletion ## Response Structure Returns confirmation that the thread was successfully deleted. ## Use Cases This endpoint is ideal for: - **Data Cleanup**: Remove outdated or completed thread conversations - **Communication Management**: Clean up unnecessary or spam threads - **Privacy Compliance**: Delete threads upon request (GDPR, etc.) - **System Maintenance**: Remove test or duplicate thread data - **Workflow Completion**: Remove threads when processes are complete - **Content Moderation**: Remove inappropriate or policy-violating threads ## Important Considerations Before deleting a thread, consider: - **Active Communications**: Check if thread has ongoing conversations - **Historical Value**: Consider impact on communication history and analytics - **Associated Data**: Review any entities or workflows linked to the thread - **Backup Requirements**: Ensure proper backup if recovery might be needed - **Compliance**: Follow data retention and deletion policies - **User Notification**: Consider notifying relevant users of the deletion ## Referential Impact Thread deletion may affect: - **Communication History**: Loss of conversation context and history - **Lead Communications**: Impact on lead management and sales processes - **Support Tickets**: Effect on customer support history and analytics - **Property Communications**: Loss of property-related conversation context - **Analytics**: Impact on communication analytics and reporting ## Data Relationships The system handles these relationships during deletion: - **Message History**: All messages in the thread are deleted - **User References**: User participation records are updated appropriately - **Entity Associations**: Links to leads, properties, and other entities are removed - **Tag Associations**: Thread tag relationships are cleaned up - **Workflow References**: Process and workflow references are updated ## Error Handling Common errors include: - **Thread Not Found**: Thread ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete threads - **Referential Constraints**: Thread cannot be deleted due to active dependencies - **System Errors**: Database or system issues preventing deletion - **Business Rules**: Business logic preventing deletion (e.g., active communications) ## Recovery - **No API Recovery**: Deleted threads cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Data Archival**: Consider data archival policies for compliance - **Recreation**: Similar threads can be created with POST /v4/threads * @summary Delete a specific thread by threadId * @param {string} threadId The unique identifier of the thread * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerDeleteThreadV4Raw(requestParameters: V4ThreadsControllerDeleteThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsDeleteThreadResponseDto>>; /** * # DELETE /v4/threads/{threadId} ## Overview Deletes an existing conversation thread from the system. This is a permanent operation that removes the thread and handles all associated data relationships appropriately. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to delete | ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization can be deleted ## Deletion Behavior The deletion operation: - **Permanent Removal**: Thread is permanently deleted from the system - **Cascade Handling**: Associated relationships and references are handled appropriately - **Immediate Effect**: Deletion is applied immediately - **Audit Trail**: Deletion is logged for audit and compliance purposes - **Data Integrity**: System ensures referential integrity during deletion ## Response Structure Returns confirmation that the thread was successfully deleted. ## Use Cases This endpoint is ideal for: - **Data Cleanup**: Remove outdated or completed thread conversations - **Communication Management**: Clean up unnecessary or spam threads - **Privacy Compliance**: Delete threads upon request (GDPR, etc.) - **System Maintenance**: Remove test or duplicate thread data - **Workflow Completion**: Remove threads when processes are complete - **Content Moderation**: Remove inappropriate or policy-violating threads ## Important Considerations Before deleting a thread, consider: - **Active Communications**: Check if thread has ongoing conversations - **Historical Value**: Consider impact on communication history and analytics - **Associated Data**: Review any entities or workflows linked to the thread - **Backup Requirements**: Ensure proper backup if recovery might be needed - **Compliance**: Follow data retention and deletion policies - **User Notification**: Consider notifying relevant users of the deletion ## Referential Impact Thread deletion may affect: - **Communication History**: Loss of conversation context and history - **Lead Communications**: Impact on lead management and sales processes - **Support Tickets**: Effect on customer support history and analytics - **Property Communications**: Loss of property-related conversation context - **Analytics**: Impact on communication analytics and reporting ## Data Relationships The system handles these relationships during deletion: - **Message History**: All messages in the thread are deleted - **User References**: User participation records are updated appropriately - **Entity Associations**: Links to leads, properties, and other entities are removed - **Tag Associations**: Thread tag relationships are cleaned up - **Workflow References**: Process and workflow references are updated ## Error Handling Common errors include: - **Thread Not Found**: Thread ID does not exist or belongs to different organization - **Permission Denied**: User lacks permission to delete threads - **Referential Constraints**: Thread cannot be deleted due to active dependencies - **System Errors**: Database or system issues preventing deletion - **Business Rules**: Business logic preventing deletion (e.g., active communications) ## Recovery - **No API Recovery**: Deleted threads cannot be restored through the API - **Backup Systems**: Recovery may be possible through system backups - **Audit Logs**: Deletion events are recorded for audit purposes - **Data Archival**: Consider data archival policies for compliance - **Recreation**: Similar threads can be created with POST /v4/threads * Delete a specific thread by threadId */ v4ThreadsControllerDeleteThreadV4(requestParameters: V4ThreadsControllerDeleteThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsDeleteThreadResponseDto>; /** * # GET /v4/threads/{threadId}/{columns} ## Overview Retrieves specific columns for a conversation thread identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified thread. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `tid,title,organizationId` - **Content Information**: `content,tags` - **Association Data**: `leadId,pid` - **Timestamp Data**: `createdAt,updatedAt` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `tid`: Thread ID - `title`: Thread title or subject - `organizationId`: Organization ID ### Content Information - `content`: Thread content or initial message - `tags`: Array of tags associated with the thread - `category`: Thread category or type - `priority`: Thread priority level - `status`: Thread status (active, closed, etc.) ### Association Information - `leadId`: Associated lead ID - `pid`: Associated property ID - `contactId`: Associated contact ID - `userId`: Thread creator user ID - `assignedTo`: User assigned to handle the thread ### Timestamp Information - `createdAt`: Thread creation timestamp - `updatedAt`: Last modification timestamp - `lastActivityAt`: Last activity timestamp - `resolvedAt`: Thread resolution timestamp ## Access Control - **Organization Scope**: Thread must belong to the user\'s organization - **Column Validation**: Invalid column names are ignored - **Data Privacy**: Only authorized columns are returned ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Retrieve only needed data to reduce bandwidth - **Specific Comparisons**: Get particular fields for thread comparison tables - **Integration**: Extract specific data points for external systems - **Custom Views**: Build interfaces with selective data display - **Mobile Optimization**: Minimize data transfer for mobile applications - **API Efficiency**: Reduce response size for better performance ## Performance Benefits - **Reduced Data Transfer**: Only requested columns are returned - **Faster Processing**: Less data processing on both server and client - **Network Efficiency**: Smaller response payloads - **Selective Queries**: Database queries target only required fields - **Cache Optimization**: Smaller responses improve caching efficiency * @summary Get specific columns of a thread by threadId * @param {string} columns Comma-separated list of column names * @param {string} threadId The unique identifier of the thread * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerGetThreadColumnsV4Raw(requestParameters: V4ThreadsControllerGetThreadColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsGetThreadColumnsResponseDto>>; /** * # GET /v4/threads/{threadId}/{columns} ## Overview Retrieves specific columns for a conversation thread identified by its unique ID. This endpoint allows selective data retrieval, returning only the requested fields for the specified thread. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread | | `columns` | string | Yes | Comma-separated list of column names to retrieve | ## Column Selection Specify desired columns as a comma-separated string: - **Basic Info**: `tid,title,organizationId` - **Content Information**: `content,tags` - **Association Data**: `leadId,pid` - **Timestamp Data**: `createdAt,updatedAt` - **Custom Selection**: Any combination of available columns ## Available Columns ### Basic Information - `tid`: Thread ID - `title`: Thread title or subject - `organizationId`: Organization ID ### Content Information - `content`: Thread content or initial message - `tags`: Array of tags associated with the thread - `category`: Thread category or type - `priority`: Thread priority level - `status`: Thread status (active, closed, etc.) ### Association Information - `leadId`: Associated lead ID - `pid`: Associated property ID - `contactId`: Associated contact ID - `userId`: Thread creator user ID - `assignedTo`: User assigned to handle the thread ### Timestamp Information - `createdAt`: Thread creation timestamp - `updatedAt`: Last modification timestamp - `lastActivityAt`: Last activity timestamp - `resolvedAt`: Thread resolution timestamp ## Access Control - **Organization Scope**: Thread must belong to the user\'s organization - **Column Validation**: Invalid column names are ignored - **Data Privacy**: Only authorized columns are returned ## Use Cases This endpoint is ideal for: - **Performance Optimization**: Retrieve only needed data to reduce bandwidth - **Specific Comparisons**: Get particular fields for thread comparison tables - **Integration**: Extract specific data points for external systems - **Custom Views**: Build interfaces with selective data display - **Mobile Optimization**: Minimize data transfer for mobile applications - **API Efficiency**: Reduce response size for better performance ## Performance Benefits - **Reduced Data Transfer**: Only requested columns are returned - **Faster Processing**: Less data processing on both server and client - **Network Efficiency**: Smaller response payloads - **Selective Queries**: Database queries target only required fields - **Cache Optimization**: Smaller responses improve caching efficiency * Get specific columns of a thread by threadId */ v4ThreadsControllerGetThreadColumnsV4(requestParameters: V4ThreadsControllerGetThreadColumnsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsGetThreadColumnsResponseDto>; /** * # GET /v4/threads/{threadId} ## Overview Retrieves detailed information for a specific conversation thread by its unique identifier. This endpoint returns complete thread data including content, associations, and metadata. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization are accessible ## Response Structure Returns a complete thread object with all available fields and conversation information. ## Use Cases This endpoint is ideal for: - **Thread Detail Views**: Display complete thread information in detail pages - **Communication History**: Access full conversation details and context - **Lead Management**: Get detailed thread information for lead communications - **Customer Support**: Access complete support ticket threads and conversations - **Property Communications**: View detailed conversations about specific properties - **Workflow Management**: Access thread details for process management ## Thread Information Access The response includes comprehensive thread information: - **Content Details**: Complete thread content and message information - **Association Details**: Links to leads, properties, and other entities - **Metadata**: Creation timestamps, user attribution, and organizational context - **Tag Information**: All tags and categorization data - **Relationship Data**: Associated entities and their relationships - **Activity History**: Thread activity and participation details ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual threads - **Complete Data**: Returns all available thread fields and information - **Real-time Data**: Always returns current thread information - **Organization Filtering**: Automatic organization scoping ensures security * @summary Get a specific thread by threadId * @param {string} threadId The unique identifier of the thread * @param {number} [viewId] The ID of the view to use for retrieving the repository * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerGetThreadV4Raw(requestParameters: V4ThreadsControllerGetThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsGetThreadResponseDto>>; /** * # GET /v4/threads/{threadId} ## Overview Retrieves detailed information for a specific conversation thread by its unique identifier. This endpoint returns complete thread data including content, associations, and metadata. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to retrieve | ### Query Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `viewId` | number | No | Optional view ID to apply column selection and formatting | ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization are accessible ## Response Structure Returns a complete thread object with all available fields and conversation information. ## Use Cases This endpoint is ideal for: - **Thread Detail Views**: Display complete thread information in detail pages - **Communication History**: Access full conversation details and context - **Lead Management**: Get detailed thread information for lead communications - **Customer Support**: Access complete support ticket threads and conversations - **Property Communications**: View detailed conversations about specific properties - **Workflow Management**: Access thread details for process management ## Thread Information Access The response includes comprehensive thread information: - **Content Details**: Complete thread content and message information - **Association Details**: Links to leads, properties, and other entities - **Metadata**: Creation timestamps, user attribution, and organizational context - **Tag Information**: All tags and categorization data - **Relationship Data**: Associated entities and their relationships - **Activity History**: Thread activity and participation details ## Performance Considerations - **Single Record Fetch**: Optimized for retrieving individual threads - **Complete Data**: Returns all available thread fields and information - **Real-time Data**: Always returns current thread information - **Organization Filtering**: Automatic organization scoping ensures security * Get a specific thread by threadId */ v4ThreadsControllerGetThreadV4(requestParameters: V4ThreadsControllerGetThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsGetThreadResponseDto>; /** * # GET /v4/threads/viewId/{viewId} ## Overview Retrieves threads filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of conversation threads. ## 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 threads to return (default: 20, max: 100) | | `offset` | number | No | Number of threads to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of threads without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the thread dataset - **Sorts**: View sort criteria determine the order of returned threads - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Threads are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization threads are accessible through views ## Response Structure Returns threads that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display threads according to predefined views - **Filtered Reports**: Generate reports with specific thread criteria - **Saved Searches**: Retrieve threads using saved filter combinations - **User Preferences**: Apply user-defined thread viewing preferences - **Specialized Views**: Access threads for specific lead types or property categories ## View Consistency - **Reproducible Results**: Same view ID produces consistent results - **Filter Persistence**: View filters remain constant across requests - **Sort Stability**: View sorting provides predictable ordering - **Column Consistency**: Same columns returned for each request ## Performance Benefits - **Optimized Queries**: View-specific optimizations improve performance - **Cached Configurations**: View settings are cached for faster execution - **Reduced Overhead**: Only requested columns are processed and returned - **Efficient Filtering**: Database-level filtering reduces data transfer * @summary Get threads 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 ThreadsAPIV4ApiInterface */ v4ThreadsControllerGetThreadsInViewV4Raw(requestParameters: V4ThreadsControllerGetThreadsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsGetThreadsInViewResponseDto>>; /** * # GET /v4/threads/viewId/{viewId} ## Overview Retrieves threads filtered by a specific view configuration. This endpoint applies view-defined filters, sorts, and column selections to provide a customized dataset of conversation threads. ## 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 threads to return (default: 20, max: 100) | | `offset` | number | No | Number of threads to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of threads without the actual data | ## View Application The specified view configuration is applied automatically: - **Filters**: All view filters are applied to narrow the thread dataset - **Sorts**: View sort criteria determine the order of returned threads - **Columns**: View column selection determines which fields are returned - **Relationships**: Related data inclusion based on view configuration ## Access Control - **Organization Scope**: Threads are filtered by the user\'s organization - **View Ownership**: View must belong to the requesting user - **Data Privacy**: Only organization threads are accessible through views ## Response Structure Returns threads that match the specified view configuration. ## Use Cases This endpoint is ideal for: - **Custom Dashboards**: Display threads according to predefined views - **Filtered Reports**: Generate reports with specific thread criteria - **Saved Searches**: Retrieve threads using saved filter combinations - **User Preferences**: Apply user-defined thread viewing preferences - **Specialized Views**: Access threads for specific lead types or property categories ## View Consistency - **Reproducible Results**: Same view ID produces consistent results - **Filter Persistence**: View filters remain constant across requests - **Sort Stability**: View sorting provides predictable ordering - **Column Consistency**: Same columns returned for each request ## Performance Benefits - **Optimized Queries**: View-specific optimizations improve performance - **Cached Configurations**: View settings are cached for faster execution - **Reduced Overhead**: Only requested columns are processed and returned - **Efficient Filtering**: Database-level filtering reduces data transfer * Get threads with a specific viewId */ v4ThreadsControllerGetThreadsInViewV4(requestParameters: V4ThreadsControllerGetThreadsInViewV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsGetThreadsInViewResponseDto>; /** * # GET /v4/threads ## Overview Retrieves a list of conversation threads with optional filtering, sorting, and pagination capabilities. This endpoint provides access to thread information including titles, content, tags, and associated leads or properties. ## 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 and column selection | | `limit` | number | No | Maximum number of threads to return (default: 20, max: 100) | | `offset` | number | No | Number of threads to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of threads without the actual data | ## Access Control - **Organization Scope**: Threads are filtered by the user\'s organization - **Data Privacy**: Only threads within the organization are accessible - **Permission**: User must have thread read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the thread dataset - **Sorts**: View sort criteria determine the order of returned threads - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of threads matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Communication Management**: Building thread listing interfaces and communication dashboards - **Customer Support**: Managing support ticket threads and conversations - **Lead Management**: Tracking communication threads related to leads - **Property Management**: Organizing conversations about specific properties - **Team Collaboration**: Managing internal team communication threads - **Knowledge Management**: Building searchable conversation archives ## Thread Data Categories Thread information includes: - **Basic Information**: Thread ID, title, and creation details - **Content**: Thread content and message details - **Metadata**: Tags, categories, and organizational information - **Associations**: Links to leads, properties, or other entities - **Participation**: User involvement and activity tracking - **Timeline**: Creation and modification timestamps ## Performance Considerations - **Optimized Queries**: Database queries are optimized for organization filtering - **View Caching**: View configurations are cached for improved performance - **Index Usage**: Queries utilize database indexes for fast retrieval - **Response Size**: Use limit parameter to control response size * @summary Get threads with optional viewId * @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 {boolean} [countOnly] Whether to return only the count of objects instead of the objects themselves * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerGetThreadsV4Raw(requestParameters: V4ThreadsControllerGetThreadsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsGetThreadsResponseDto>>; /** * # GET /v4/threads ## Overview Retrieves a list of conversation threads with optional filtering, sorting, and pagination capabilities. This endpoint provides access to thread information including titles, content, tags, and associated leads or properties. ## 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 and column selection | | `limit` | number | No | Maximum number of threads to return (default: 20, max: 100) | | `offset` | number | No | Number of threads to skip for pagination (default: 0) | | `countOnly` | boolean | No | Return only the count of threads without the actual data | ## Access Control - **Organization Scope**: Threads are filtered by the user\'s organization - **Data Privacy**: Only threads within the organization are accessible - **Permission**: User must have thread read permissions ## View Integration When a `viewId` is provided: - **Filters**: All view filters are applied to narrow the thread dataset - **Sorts**: View sort criteria determine the order of returned threads - **Columns**: View column selection determines which fields are returned - **Consistent Results**: Same view produces consistent response structure ## Response Structure Returns a paginated list of threads matching the specified criteria. ## Use Cases This endpoint is ideal for: - **Communication Management**: Building thread listing interfaces and communication dashboards - **Customer Support**: Managing support ticket threads and conversations - **Lead Management**: Tracking communication threads related to leads - **Property Management**: Organizing conversations about specific properties - **Team Collaboration**: Managing internal team communication threads - **Knowledge Management**: Building searchable conversation archives ## Thread Data Categories Thread information includes: - **Basic Information**: Thread ID, title, and creation details - **Content**: Thread content and message details - **Metadata**: Tags, categories, and organizational information - **Associations**: Links to leads, properties, or other entities - **Participation**: User involvement and activity tracking - **Timeline**: Creation and modification timestamps ## Performance Considerations - **Optimized Queries**: Database queries are optimized for organization filtering - **View Caching**: View configurations are cached for improved performance - **Index Usage**: Queries utilize database indexes for fast retrieval - **Response Size**: Use limit parameter to control response size * Get threads with optional viewId */ v4ThreadsControllerGetThreadsV4(requestParameters: V4ThreadsControllerGetThreadsV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<V4ThreadsGetThreadsResponseDto>; /** * # PATCH /v4/threads/{threadId} ## Overview Updates an existing conversation thread with the provided information. This endpoint allows partial updates, meaning you only need to include the fields you want to change. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to update | ## Request Body The request body should contain only the fields you want to update. All fields are optional for updates. ### Updateable Fields | Field | Type | Description | |-------|------|-------------| | `title` | string | Thread title or subject | | `content` | string | Thread content or initial message | | `tags` | array | Array of tags to categorize the thread | ### Validation Rules - **Title**: Must be non-empty string (if provided) - **Content**: Must be non-empty string (if provided) - **Tags**: Must be array of valid strings (if provided) - **Partial Updates**: Only provided fields will be updated - **Organization Scope**: Thread must belong to user\'s organization ## Request Example ```json { \"title\": \"Updated Property Viewing Request\", \"tags\": [\"viewing\", \"customer-inquiry\", \"downtown\", \"urgent\"] } ``` ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization can be updated ## Response Structure Returns confirmation that the thread was successfully updated. ## Use Cases This endpoint is ideal for: - **Content Updates**: Modify thread titles and content as information changes - **Tag Management**: Update thread categorization and organization - **Status Updates**: Change thread status and priority levels - **Data Correction**: Fix incorrect thread information - **Communication Management**: Update thread information for better organization - **Workflow Updates**: Modify thread details as processes evolve ## Update Scenarios ### Content Modifications - **Title Updates**: Change thread titles for better clarity - **Content Updates**: Modify initial content for accuracy - **Tag Updates**: Add or remove tags for better categorization ### Status and Priority Changes - **Status Updates**: Change thread status (active, resolved, closed) - **Priority Changes**: Update thread priority levels - **Assignment Updates**: Change user assignments for threads ### Organizational Updates - **Category Changes**: Update thread categories and classifications - **Workflow Updates**: Modify thread workflow states - **Access Updates**: Change thread visibility and access permissions ## Validation and Constraints - **Content Validation**: All content is validated for proper formats - **Tag Validation**: Tags are validated for format and length constraints - **Data Integrity**: Updates maintain data consistency and integrity - **Organization Scoping**: Updates are scoped to the user\'s organization - **Audit Trail**: All updates are logged for compliance and tracking ## Error Handling Common validation errors include: - **Thread Not Found**: Thread ID does not exist or belongs to different organization - **Invalid Content**: Content does not meet validation requirements - **Invalid Tags**: Tags contain invalid characters or exceed limits - **Permission Denied**: User lacks permission to update threads - **Content Too Long**: Updated content exceeds maximum allowed length * @summary Update a specific thread by threadId * @param {string} threadId The unique identifier of the thread * @param {V4ThreadsUpdateThreadBodyDto} v4ThreadsUpdateThreadBodyDto * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ThreadsAPIV4ApiInterface */ v4ThreadsControllerUpdateThreadV4Raw(requestParameters: V4ThreadsControllerUpdateThreadV4Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<V4ThreadsUpdateThreadResponseDto>>; /** * # PATCH /v4/threads/{threadId} ## Overview Updates an existing conversation thread with the provided information. This endpoint allows partial updates, meaning you only need to include the fields you want to change. ## Authentication - **Required**: Yes - **Security**: - `x-api-key` header - `organization-id` header ## Request Parameters ### Path Parameters | Parameter | Type | Required | Description | |-----------|------|----------|-------------| | `threadId` | number | Yes | The unique identifier of the thread to update | ## Request Body The request body should contain only the fields you want to update. All fields are optional for updates. ### Updateable Fields | Field | Type | Description | |-------|------|-------------| | `title` | string | Thread title or subject | | `content` | string | Thread content or initial message | | `tags` | array | Array of tags to categorize the thread | ### Validation Rules - **Title**: Must be non-empty string (if provided) - **Content**: Must be non-empty string (if provided) - **Tags**: Must be array of valid strings (if provided) - **Partial Updates**: Only provided fields will be updated - **Organization Scope**: Thread must belong to user\'s organization ## Request Example ```json { \"title\": \"Updated Property Viewing Request\", \"tags\": [\"viewing\", \"customer-inquiry\", \"downtown\", \"urgent\"] } ``` ## Access Control - **Organization Scope**: Thread must belong to the authenticated user\'s organization - **Thread Validation**: Invalid or non-existent thread IDs will return a 404 error - **Data Privacy**: Only threads within the user\'s organization can be updated ## Response Structure Returns confirmation that the thread was successfully updated. ## Use Cases This endpoint is ideal for: - **Content Updates**: Modify thread titles and content as information changes - **Tag Management**: Update thread categorization and organization - **Status Updates**: Change thread status and priority levels - **Data Correction**: Fix incorrect thread information - **Communication Management**: Update thread information for better organization - **Workflow Updates**: Modify thread details as processes evolve ## Update Scenarios ### Content Modifications - **Title Updates**: Change thread titles for better clarity - **Content Updates**: Modify initial content for accuracy - **Tag Updates**: Add or remove