UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

305 lines (304 loc) 33.3 kB
/* tslint:disable */ /* eslint-disable */ /** * 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 { V4LeadPropertyRelationsCreateRelLeadPropertyBodyDtoToJSON, V4LeadPropertyRelationsCreateRelLeadPropertyResponseDtoFromJSON, V4LeadPropertyRelationsDeleteRelLeadPropertyResponseDtoFromJSON, V4LeadPropertyRelationsGetRelLeadPropertiesInViewResponseDtoFromJSON, V4LeadPropertyRelationsGetRelLeadPropertiesResponseDtoFromJSON, V4LeadPropertyRelationsGetRelLeadPropertyColumnsResponseDtoFromJSON, V4LeadPropertyRelationsGetRelLeadPropertyResponseDtoFromJSON, V4LeadPropertyRelationsUpdateRelLeadPropertyBodyDtoToJSON, V4LeadPropertyRelationsUpdateRelLeadPropertyResponseDtoFromJSON, } from '../models/index'; /** * */ export class RelationsLeadPropertiesAPIV4Api extends runtime.BaseAPI { /** * ## POST /v4/rel-lead-properties ### Overview Creates a new relationship between a lead and a property. This endpoint allows you to associate leads with properties they are interested in for investment analysis and pipeline management. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Request Body The request body should contain the lead and property identifiers to create the relationship. #### Required Fields - **leadId** (number): Lead identifier - **pid** (string): Property identifier ### Business Use Cases - **Lead Association**: Associating leads with properties they\'re interested in - **Pipeline Management**: Building and maintaining lead-property relationship data - **Interest Tracking**: Recording which properties leads have shown interest in - **Deal Flow**: Managing the flow of leads through property evaluations - **Investment Analysis**: Connecting leads to specific investment opportunities ### Request Body Example ```json { \"leadId\": 123, \"pid\": \"property-456\" } ``` * Create a new rel-lead-property */ async v4LeadPropertyRelationsControllerCreateRelLeadPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['v4LeadPropertyRelationsCreateRelLeadPropertyBodyDto'] == null) { throw new runtime.RequiredError('v4LeadPropertyRelationsCreateRelLeadPropertyBodyDto', 'Required parameter "v4LeadPropertyRelationsCreateRelLeadPropertyBodyDto" was null or undefined when calling v4LeadPropertyRelationsControllerCreateRelLeadPropertyV4().'); } const queryParameters = {}; const headerParameters = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: V4LeadPropertyRelationsCreateRelLeadPropertyBodyDtoToJSON(requestParameters['v4LeadPropertyRelationsCreateRelLeadPropertyBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsCreateRelLeadPropertyResponseDtoFromJSON(jsonValue)); } /** * ## POST /v4/rel-lead-properties ### Overview Creates a new relationship between a lead and a property. This endpoint allows you to associate leads with properties they are interested in for investment analysis and pipeline management. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Request Body The request body should contain the lead and property identifiers to create the relationship. #### Required Fields - **leadId** (number): Lead identifier - **pid** (string): Property identifier ### Business Use Cases - **Lead Association**: Associating leads with properties they\'re interested in - **Pipeline Management**: Building and maintaining lead-property relationship data - **Interest Tracking**: Recording which properties leads have shown interest in - **Deal Flow**: Managing the flow of leads through property evaluations - **Investment Analysis**: Connecting leads to specific investment opportunities ### Request Body Example ```json { \"leadId\": 123, \"pid\": \"property-456\" } ``` * Create a new rel-lead-property */ async v4LeadPropertyRelationsControllerCreateRelLeadPropertyV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerCreateRelLeadPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## DELETE /v4/rel-lead-properties/{leadId}/{pid} ### Overview Deletes a specific lead-property relationship by its composite key. This endpoint removes the association between a lead and a property, effectively indicating that the lead is no longer interested in that particular property. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Business Use Cases - **Interest Removal**: Remove lead interest from specific properties - **Pipeline Cleanup**: Clean up outdated or irrelevant lead-property associations - **Data Management**: Maintain accurate relationship data by removing obsolete connections - **Lead Reassignment**: Remove current associations before reassigning leads to new properties - **Status Changes**: Remove relationships when leads are no longer pursuing specific properties * Delete a specific rel-lead-property by leadId and pid */ async v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['leadId'] == null) { throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4().'); } if (requestParameters['propertyId'] == null) { throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations/leads/{leadId}/properties/{propertyId}`; urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))); urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId']))); const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsDeleteRelLeadPropertyResponseDtoFromJSON(jsonValue)); } /** * ## DELETE /v4/rel-lead-properties/{leadId}/{pid} ### Overview Deletes a specific lead-property relationship by its composite key. This endpoint removes the association between a lead and a property, effectively indicating that the lead is no longer interested in that particular property. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Business Use Cases - **Interest Removal**: Remove lead interest from specific properties - **Pipeline Cleanup**: Clean up outdated or irrelevant lead-property associations - **Data Management**: Maintain accurate relationship data by removing obsolete connections - **Lead Reassignment**: Remove current associations before reassigning leads to new properties - **Status Changes**: Remove relationships when leads are no longer pursuing specific properties * Delete a specific rel-lead-property by leadId and pid */ async v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerDeleteRelLeadPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/rel-lead-properties/viewId/{viewId} ### Overview Retrieves lead-property relationships filtered by a specific view configuration. This endpoint applies predefined filters, sorting, and column selections based on the specified view ID, providing targeted access to relationship data. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **viewId** (number, required): Unique identifier for the view configuration to apply ### Query Parameters - **limit** (number, optional): Maximum number of relationships to return (default: 20, max: 100) - **offset** (number, optional): Number of relationships to skip for pagination (default: 0) - **countOnly** (boolean, optional): Return only the total count without relationship data ### Business Use Cases - **Filtered Analysis**: Apply predefined filters for specific business scenarios - **Dashboard Views**: Load preconfigured relationship views for dashboards - **Report Generation**: Generate reports based on saved view configurations - **Team Workflows**: Access team-specific relationship data views - **Performance Monitoring**: Track relationships based on specific criteria * Get rel-lead-properties with a specific viewId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertiesInViewV4Raw(requestParameters, initOverrides) { if (requestParameters['viewId'] == null) { throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertiesInViewV4().'); } const queryParameters = {}; if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations/viewId/{viewId}`; urlPath = urlPath.replace(`{${"viewId"}}`, encodeURIComponent(String(requestParameters['viewId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsGetRelLeadPropertiesInViewResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/rel-lead-properties/viewId/{viewId} ### Overview Retrieves lead-property relationships filtered by a specific view configuration. This endpoint applies predefined filters, sorting, and column selections based on the specified view ID, providing targeted access to relationship data. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **viewId** (number, required): Unique identifier for the view configuration to apply ### Query Parameters - **limit** (number, optional): Maximum number of relationships to return (default: 20, max: 100) - **offset** (number, optional): Number of relationships to skip for pagination (default: 0) - **countOnly** (boolean, optional): Return only the total count without relationship data ### Business Use Cases - **Filtered Analysis**: Apply predefined filters for specific business scenarios - **Dashboard Views**: Load preconfigured relationship views for dashboards - **Report Generation**: Generate reports based on saved view configurations - **Team Workflows**: Access team-specific relationship data views - **Performance Monitoring**: Track relationships based on specific criteria * Get rel-lead-properties with a specific viewId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertiesInViewV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerGetRelLeadPropertiesInViewV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/rel-lead-properties ### Overview Retrieves lead-property relationships with optional filtering, sorting, and pagination capabilities. This endpoint provides access to the associations between leads and properties in the real estate investment pipeline, enabling comprehensive relationship management and analytics. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Query Parameters - **viewId** (number, optional): Apply specific view configuration for filtering and column selection - **limit** (number, optional): Maximum number of relationships to return (default: 20, max: 100) - **offset** (number, optional): Number of relationships to skip for pagination (default: 0) - **countOnly** (boolean, optional): Return only the total count without relationship data ### Business Use Cases - **Lead Management**: Track which properties are associated with specific leads - **Property Analytics**: Analyze interest patterns and engagement across property inventory - **Pipeline Management**: Monitor lead progression through property evaluations - **Relationship Mapping**: Build comprehensive views of lead-property associations - **Performance Metrics**: Generate reports on lead-property interaction patterns - **Investment Analysis**: Connect leads to specific investment opportunities for decision making ### Response Format Returns paginated list of lead-property relationships with metadata including total count and relationship details. * Get relations lead properties with optional viewId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertiesV4Raw(requestParameters, initOverrides) { const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } if (requestParameters['offset'] != null) { queryParameters['offset'] = requestParameters['offset']; } if (requestParameters['countOnly'] != null) { queryParameters['countOnly'] = requestParameters['countOnly']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsGetRelLeadPropertiesResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/rel-lead-properties ### Overview Retrieves lead-property relationships with optional filtering, sorting, and pagination capabilities. This endpoint provides access to the associations between leads and properties in the real estate investment pipeline, enabling comprehensive relationship management and analytics. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Query Parameters - **viewId** (number, optional): Apply specific view configuration for filtering and column selection - **limit** (number, optional): Maximum number of relationships to return (default: 20, max: 100) - **offset** (number, optional): Number of relationships to skip for pagination (default: 0) - **countOnly** (boolean, optional): Return only the total count without relationship data ### Business Use Cases - **Lead Management**: Track which properties are associated with specific leads - **Property Analytics**: Analyze interest patterns and engagement across property inventory - **Pipeline Management**: Monitor lead progression through property evaluations - **Relationship Mapping**: Build comprehensive views of lead-property associations - **Performance Metrics**: Generate reports on lead-property interaction patterns - **Investment Analysis**: Connect leads to specific investment opportunities for decision making ### Response Format Returns paginated list of lead-property relationships with metadata including total count and relationship details. * Get relations lead properties with optional viewId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertiesV4(requestParameters = {}, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerGetRelLeadPropertiesV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/rel-lead-properties/{leadId}/{pid}/{columns} ### Overview Retrieves specific columns of a lead-property relationship by its composite key. This endpoint allows selective data retrieval, returning only the specified columns for optimal performance and bandwidth usage. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property - **columns** (string, required): Comma-separated list of column names to retrieve ### Business Use Cases - **Performance Optimization**: Retrieve only necessary data fields - **Bandwidth Conservation**: Reduce payload size for mobile or limited bandwidth scenarios - **Selective Data Access**: Access specific relationship attributes for targeted analysis - **Integration Efficiency**: Support external systems requiring only specific data points * Get specific columns of a rel-lead-property by leadId and propertyId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4Raw(requestParameters, initOverrides) { if (requestParameters['columns'] == null) { throw new runtime.RequiredError('columns', 'Required parameter "columns" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4().'); } if (requestParameters['leadId'] == null) { throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4().'); } if (requestParameters['propertyId'] == null) { throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4().'); } const queryParameters = {}; const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations/leads/{leadId}/properties/{propertyId}/{columns}`; urlPath = urlPath.replace(`{${"columns"}}`, encodeURIComponent(String(requestParameters['columns']))); urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))); urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsGetRelLeadPropertyColumnsResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/rel-lead-properties/{leadId}/{pid}/{columns} ### Overview Retrieves specific columns of a lead-property relationship by its composite key. This endpoint allows selective data retrieval, returning only the specified columns for optimal performance and bandwidth usage. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property - **columns** (string, required): Comma-separated list of column names to retrieve ### Business Use Cases - **Performance Optimization**: Retrieve only necessary data fields - **Bandwidth Conservation**: Reduce payload size for mobile or limited bandwidth scenarios - **Selective Data Access**: Access specific relationship attributes for targeted analysis - **Integration Efficiency**: Support external systems requiring only specific data points * Get specific columns of a rel-lead-property by leadId and propertyId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerGetRelLeadPropertyColumnsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/rel-lead-properties/{leadId}/{pid} ### Overview Retrieves a specific lead-property relationship by its composite key (leadId and pid). This endpoint provides detailed information about a single relationship between a lead and a property. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Query Parameters - **viewId** (number, optional): Apply specific view configuration for column selection and related data inclusion ### Business Use Cases - **Relationship Verification**: Confirm specific lead-property associations - **Detail Analysis**: Get comprehensive details about a specific relationship - **Data Validation**: Verify relationship existence and properties - **Integration Support**: Support for external system integrations requiring specific relationship data * Get a specific rel-lead-property by leadId and propertyId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['leadId'] == null) { throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertyV4().'); } if (requestParameters['propertyId'] == null) { throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4LeadPropertyRelationsControllerGetRelLeadPropertyV4().'); } const queryParameters = {}; if (requestParameters['viewId'] != null) { queryParameters['viewId'] = requestParameters['viewId']; } const headerParameters = {}; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations/leads/{leadId}/properties/{propertyId}`; urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))); urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsGetRelLeadPropertyResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/rel-lead-properties/{leadId}/{pid} ### Overview Retrieves a specific lead-property relationship by its composite key (leadId and pid). This endpoint provides detailed information about a single relationship between a lead and a property. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Query Parameters - **viewId** (number, optional): Apply specific view configuration for column selection and related data inclusion ### Business Use Cases - **Relationship Verification**: Confirm specific lead-property associations - **Detail Analysis**: Get comprehensive details about a specific relationship - **Data Validation**: Verify relationship existence and properties - **Integration Support**: Support for external system integrations requiring specific relationship data * Get a specific rel-lead-property by leadId and propertyId */ async v4LeadPropertyRelationsControllerGetRelLeadPropertyV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerGetRelLeadPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## PATCH /v4/rel-lead-properties/{leadId}/{pid} ### Overview Updates a specific lead-property relationship by its composite key. Note that relationship tables typically have minimal updateable fields since they primarily manage associations between entities. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Request Body The request body should contain the fields to update. For relationship tables, this is typically empty or contains metadata fields. ### Business Use Cases - **Relationship Metadata**: Update any metadata associated with the relationship - **Status Changes**: Modify relationship status or flags if applicable - **Audit Trail**: Update relationship audit information ### Note This endpoint is rarely used for pure relationship tables as they typically only contain foreign keys. It\'s included for API completeness and future extensibility. * Update a specific rel-lead-property by leadId and pid */ async v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['leadId'] == null) { throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4().'); } if (requestParameters['propertyId'] == null) { throw new runtime.RequiredError('propertyId', 'Required parameter "propertyId" was null or undefined when calling v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4().'); } if (requestParameters['v4LeadPropertyRelationsUpdateRelLeadPropertyBodyDto'] == null) { throw new runtime.RequiredError('v4LeadPropertyRelationsUpdateRelLeadPropertyBodyDto', 'Required parameter "v4LeadPropertyRelationsUpdateRelLeadPropertyBodyDto" was null or undefined when calling v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4().'); } const queryParameters = {}; const headerParameters = {}; headerParameters['Content-Type'] = 'application/json'; if (this.configuration && this.configuration.apiKey) { headerParameters["x-api-key"] = await this.configuration.apiKey("x-api-key"); // x-api-key authentication } if (this.configuration && this.configuration.apiKey) { headerParameters["organization-id"] = await this.configuration.apiKey("organization-id"); // organization-id authentication } let urlPath = `/v4/lead-property-relations/leads/{leadId}/properties/{propertyId}`; urlPath = urlPath.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))); urlPath = urlPath.replace(`{${"propertyId"}}`, encodeURIComponent(String(requestParameters['propertyId']))); const response = await this.request({ path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: V4LeadPropertyRelationsUpdateRelLeadPropertyBodyDtoToJSON(requestParameters['v4LeadPropertyRelationsUpdateRelLeadPropertyBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4LeadPropertyRelationsUpdateRelLeadPropertyResponseDtoFromJSON(jsonValue)); } /** * ## PATCH /v4/rel-lead-properties/{leadId}/{pid} ### Overview Updates a specific lead-property relationship by its composite key. Note that relationship tables typically have minimal updateable fields since they primarily manage associations between entities. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **leadId** (number, required): Unique identifier for the lead - **pid** (string, required): Unique identifier for the property ### Request Body The request body should contain the fields to update. For relationship tables, this is typically empty or contains metadata fields. ### Business Use Cases - **Relationship Metadata**: Update any metadata associated with the relationship - **Status Changes**: Modify relationship status or flags if applicable - **Audit Trail**: Update relationship audit information ### Note This endpoint is rarely used for pure relationship tables as they typically only contain foreign keys. It\'s included for API completeness and future extensibility. * Update a specific rel-lead-property by leadId and pid */ async v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4(requestParameters, initOverrides) { const response = await this.v4LeadPropertyRelationsControllerUpdateRelLeadPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } }