UNPKG

@simplyhomes/sos-sdk

Version:

TypeScript SDK for Simply Homes SoS API v4

305 lines (304 loc) 33.6 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 { V4ContactPropertyRelationsCreateRelContactPropertyBodyDtoToJSON, V4ContactPropertyRelationsCreateRelContactPropertyResponseDtoFromJSON, V4ContactPropertyRelationsDeleteRelContactPropertyResponseDtoFromJSON, V4ContactPropertyRelationsGetRelContactPropertiesInViewResponseDtoFromJSON, V4ContactPropertyRelationsGetRelContactPropertiesResponseDtoFromJSON, V4ContactPropertyRelationsGetRelContactPropertyColumnsResponseDtoFromJSON, V4ContactPropertyRelationsGetRelContactPropertyResponseDtoFromJSON, V4ContactPropertyRelationsUpdateRelContactPropertyBodyDtoToJSON, V4ContactPropertyRelationsUpdateRelContactPropertyResponseDtoFromJSON, } from '../models/index'; /** * */ export class ContactPropertyRelationsAPIV4Api extends runtime.BaseAPI { /** * ## POST /v4/contact-property-relations ### Overview Creates a new relationship between a contact and a property. This endpoint allows you to establish connections between contacts and properties for various relationship types such as property management, ownership, or other associations in the real estate investment pipeline. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Request Body The request body should contain the contact and property identifiers to create the relationship. #### Required Fields - **contactId** (number): Contact identifier - **pid** (string): Property identifier #### Optional Fields - **type** (string): Type of relationship (e.g., \"Property Manager\", \"Owner\", \"Tenant\") ### Request Body Example ```json { \"contactId\": 123, \"pid\": \"property123\", \"type\": \"Property Manager\" } ``` ### Business Use Cases - **Property Management**: Assigning property managers to specific properties - **Ownership Tracking**: Establishing property ownership relationships - **Tenant Management**: Connecting tenants to their rental properties - **Contractor Assignment**: Linking contractors to properties for maintenance - **Agent Assignment**: Assigning real estate agents to property listings - **Vendor Management**: Connecting vendors to properties for services - **Emergency Contacts**: Establishing emergency contact relationships for properties * Create a new contact-property relationship */ async v4ContactPropertyRelationsControllerCreateRelContactPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['v4ContactPropertyRelationsCreateRelContactPropertyBodyDto'] == null) { throw new runtime.RequiredError('v4ContactPropertyRelationsCreateRelContactPropertyBodyDto', 'Required parameter "v4ContactPropertyRelationsCreateRelContactPropertyBodyDto" was null or undefined when calling v4ContactPropertyRelationsControllerCreateRelContactPropertyV4().'); } 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/contact-property-relations`; const response = await this.request({ path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, body: V4ContactPropertyRelationsCreateRelContactPropertyBodyDtoToJSON(requestParameters['v4ContactPropertyRelationsCreateRelContactPropertyBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsCreateRelContactPropertyResponseDtoFromJSON(jsonValue)); } /** * ## POST /v4/contact-property-relations ### Overview Creates a new relationship between a contact and a property. This endpoint allows you to establish connections between contacts and properties for various relationship types such as property management, ownership, or other associations in the real estate investment pipeline. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Request Body The request body should contain the contact and property identifiers to create the relationship. #### Required Fields - **contactId** (number): Contact identifier - **pid** (string): Property identifier #### Optional Fields - **type** (string): Type of relationship (e.g., \"Property Manager\", \"Owner\", \"Tenant\") ### Request Body Example ```json { \"contactId\": 123, \"pid\": \"property123\", \"type\": \"Property Manager\" } ``` ### Business Use Cases - **Property Management**: Assigning property managers to specific properties - **Ownership Tracking**: Establishing property ownership relationships - **Tenant Management**: Connecting tenants to their rental properties - **Contractor Assignment**: Linking contractors to properties for maintenance - **Agent Assignment**: Assigning real estate agents to property listings - **Vendor Management**: Connecting vendors to properties for services - **Emergency Contacts**: Establishing emergency contact relationships for properties * Create a new contact-property relationship */ async v4ContactPropertyRelationsControllerCreateRelContactPropertyV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerCreateRelContactPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## DELETE /v4/contact-property-relations/{contactId}/{pid} ### Overview Deletes a specific contact-property relationship by its composite key. This endpoint removes the association between a contact and property, effectively severing their connection. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Unique identifier for the contact - **pid** (string, required): Unique identifier for the property ### Business Use Cases - **Relationship Termination**: Remove contacts when their role with a property ends - **Property Management Changes**: Unassign property managers during transitions - **Tenant Move-out**: Remove tenant relationships when they vacate - **Ownership Transfer**: Remove previous owners during property sales - **Contract Completion**: Remove contractor relationships after work completion - **Cleanup Operations**: Remove outdated or incorrect associations - **Data Management**: Clean up duplicate or erroneous relationships ### Important Notes - This operation is irreversible - Ensure proper authorization before deleting relationships - Consider audit trail requirements for compliance - May affect related business processes and notifications * Delete a contact-property relationship */ async v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['contactId'] == null) { throw new runtime.RequiredError('contactId', 'Required parameter "contactId" was null or undefined when calling v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4().'); } if (requestParameters['pid'] == null) { throw new runtime.RequiredError('pid', 'Required parameter "pid" was null or undefined when calling v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4().'); } 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/contact-property-relations/contacts/{contactId}/properties/{pid}`; urlPath = urlPath.replace(`{${"contactId"}}`, encodeURIComponent(String(requestParameters['contactId']))); urlPath = urlPath.replace(`{${"pid"}}`, encodeURIComponent(String(requestParameters['pid']))); const response = await this.request({ path: urlPath, method: 'DELETE', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsDeleteRelContactPropertyResponseDtoFromJSON(jsonValue)); } /** * ## DELETE /v4/contact-property-relations/{contactId}/{pid} ### Overview Deletes a specific contact-property relationship by its composite key. This endpoint removes the association between a contact and property, effectively severing their connection. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Unique identifier for the contact - **pid** (string, required): Unique identifier for the property ### Business Use Cases - **Relationship Termination**: Remove contacts when their role with a property ends - **Property Management Changes**: Unassign property managers during transitions - **Tenant Move-out**: Remove tenant relationships when they vacate - **Ownership Transfer**: Remove previous owners during property sales - **Contract Completion**: Remove contractor relationships after work completion - **Cleanup Operations**: Remove outdated or incorrect associations - **Data Management**: Clean up duplicate or erroneous relationships ### Important Notes - This operation is irreversible - Ensure proper authorization before deleting relationships - Consider audit trail requirements for compliance - May affect related business processes and notifications * Delete a contact-property relationship */ async v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerDeleteRelContactPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/contact-property-relations/viewId/{viewId} ### Overview Retrieves contact-property relationships for a specific view ID with optional filtering and pagination. This endpoint provides access to relationships filtered by a predefined view configuration. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **viewId** (number, required): View ID to apply specific filters and column selection ### 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 count without actual data ### Business Use Cases - **Filtered Views**: Access predefined filtered sets of contact-property relationships - **Dashboard Data**: Populate dashboard views with specific relationship data - **Reporting**: Generate reports based on predefined view configurations * Get contact-property relationships with a specific viewId */ async v4ContactPropertyRelationsControllerGetRelContactPropertiesInViewV4Raw(requestParameters, initOverrides) { if (requestParameters['viewId'] == null) { throw new runtime.RequiredError('viewId', 'Required parameter "viewId" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertiesInViewV4().'); } 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/contact-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) => V4ContactPropertyRelationsGetRelContactPropertiesInViewResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/contact-property-relations/viewId/{viewId} ### Overview Retrieves contact-property relationships for a specific view ID with optional filtering and pagination. This endpoint provides access to relationships filtered by a predefined view configuration. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **viewId** (number, required): View ID to apply specific filters and column selection ### 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 count without actual data ### Business Use Cases - **Filtered Views**: Access predefined filtered sets of contact-property relationships - **Dashboard Data**: Populate dashboard views with specific relationship data - **Reporting**: Generate reports based on predefined view configurations * Get contact-property relationships with a specific viewId */ async v4ContactPropertyRelationsControllerGetRelContactPropertiesInViewV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerGetRelContactPropertiesInViewV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/contact-property-relations ### Overview Retrieves contact-property relationships with optional filtering, sorting, and pagination capabilities. This endpoint provides access to the associations between contacts and properties, representing various relationship types such as ownership, management, or tenancy. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Query Parameters - **viewId** (number, optional): View ID to apply specific filters 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 count without actual data ### Business Use Cases - **Property Management**: Understanding which contacts manage which properties - **Ownership Tracking**: Tracking property ownership across contacts - **Tenant Management**: Managing tenant-property relationships - **Contractor Assignment**: Tracking which contractors work on specific properties - **Emergency Contacts**: Managing emergency contact relationships for properties - **Vendor Management**: Tracking vendor-property service relationships ### Response Format Returns paginated list of contact-property relationships with metadata including total count. * Get contact-property relationships with optional viewId */ async v4ContactPropertyRelationsControllerGetRelContactPropertiesV4Raw(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/contact-property-relations`; const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsGetRelContactPropertiesResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/contact-property-relations ### Overview Retrieves contact-property relationships with optional filtering, sorting, and pagination capabilities. This endpoint provides access to the associations between contacts and properties, representing various relationship types such as ownership, management, or tenancy. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Query Parameters - **viewId** (number, optional): View ID to apply specific filters 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 count without actual data ### Business Use Cases - **Property Management**: Understanding which contacts manage which properties - **Ownership Tracking**: Tracking property ownership across contacts - **Tenant Management**: Managing tenant-property relationships - **Contractor Assignment**: Tracking which contractors work on specific properties - **Emergency Contacts**: Managing emergency contact relationships for properties - **Vendor Management**: Tracking vendor-property service relationships ### Response Format Returns paginated list of contact-property relationships with metadata including total count. * Get contact-property relationships with optional viewId */ async v4ContactPropertyRelationsControllerGetRelContactPropertiesV4(requestParameters = {}, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerGetRelContactPropertiesV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/contact-property-relations/{contactId}/{pid}/{columns} ### Overview Retrieves specific columns of a contact-property relationship by its composite key. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Contact identifier - **pid** (string, required): Property identifier - **columns** (string, required): Comma-separated list of column names to retrieve ### Business Use Cases - **Performance Optimization**: Retrieve only needed columns to reduce bandwidth - **Partial Data**: Get specific fields for lightweight operations - **Custom Views**: Build custom displays with selected relationship data * Get specific columns of a contact-property relationship by contactId and pid */ async v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4Raw(requestParameters, initOverrides) { if (requestParameters['columns'] == null) { throw new runtime.RequiredError('columns', 'Required parameter "columns" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4().'); } if (requestParameters['contactId'] == null) { throw new runtime.RequiredError('contactId', 'Required parameter "contactId" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4().'); } if (requestParameters['pid'] == null) { throw new runtime.RequiredError('pid', 'Required parameter "pid" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4().'); } 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/contact-property-relations/contacts/{contactId}/properties/{pid}/{columns}`; urlPath = urlPath.replace(`{${"columns"}}`, encodeURIComponent(String(requestParameters['columns']))); urlPath = urlPath.replace(`{${"contactId"}}`, encodeURIComponent(String(requestParameters['contactId']))); urlPath = urlPath.replace(`{${"pid"}}`, encodeURIComponent(String(requestParameters['pid']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsGetRelContactPropertyColumnsResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/contact-property-relations/{contactId}/{pid}/{columns} ### Overview Retrieves specific columns of a contact-property relationship by its composite key. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Contact identifier - **pid** (string, required): Property identifier - **columns** (string, required): Comma-separated list of column names to retrieve ### Business Use Cases - **Performance Optimization**: Retrieve only needed columns to reduce bandwidth - **Partial Data**: Get specific fields for lightweight operations - **Custom Views**: Build custom displays with selected relationship data * Get specific columns of a contact-property relationship by contactId and pid */ async v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerGetRelContactPropertyColumnsV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## GET /v4/contact-property-relations/{contactId}/{pid} ### Overview Retrieves a specific contact-property relationship by its composite key (contactId and pid). ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Contact identifier - **pid** (string, required): Property identifier ### Query Parameters - **viewId** (number, optional): View ID to apply specific column selection ### Business Use Cases - **Relationship Details**: Get specific details about a contact-property relationship - **Verification**: Verify the existence and type of a specific relationship - **Data Retrieval**: Fetch relationship data for forms or displays * Get a specific contact-property relationship by contactId and pid */ async v4ContactPropertyRelationsControllerGetRelContactPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['contactId'] == null) { throw new runtime.RequiredError('contactId', 'Required parameter "contactId" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertyV4().'); } if (requestParameters['pid'] == null) { throw new runtime.RequiredError('pid', 'Required parameter "pid" was null or undefined when calling v4ContactPropertyRelationsControllerGetRelContactPropertyV4().'); } 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/contact-property-relations/contacts/{contactId}/properties/{pid}`; urlPath = urlPath.replace(`{${"contactId"}}`, encodeURIComponent(String(requestParameters['contactId']))); urlPath = urlPath.replace(`{${"pid"}}`, encodeURIComponent(String(requestParameters['pid']))); const response = await this.request({ path: urlPath, method: 'GET', headers: headerParameters, query: queryParameters, }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsGetRelContactPropertyResponseDtoFromJSON(jsonValue)); } /** * ## GET /v4/contact-property-relations/{contactId}/{pid} ### Overview Retrieves a specific contact-property relationship by its composite key (contactId and pid). ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Contact identifier - **pid** (string, required): Property identifier ### Query Parameters - **viewId** (number, optional): View ID to apply specific column selection ### Business Use Cases - **Relationship Details**: Get specific details about a contact-property relationship - **Verification**: Verify the existence and type of a specific relationship - **Data Retrieval**: Fetch relationship data for forms or displays * Get a specific contact-property relationship by contactId and pid */ async v4ContactPropertyRelationsControllerGetRelContactPropertyV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerGetRelContactPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } /** * ## PATCH /v4/contact-property-relations/{contactId}/{pid} ### Overview Updates a specific contact-property relationship by its composite key. This endpoint allows you to modify the relationship type or other metadata associated with the contact-property connection. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Unique identifier for the contact - **pid** (string, required): Unique identifier for the property ### Request Body The request body should contain the fields to update within the relationship. #### Updateable Fields - **type** (string, optional): Type of relationship (e.g., \"Property Manager\", \"Owner\", \"Tenant\") ### Request Body Example ```json { \"relContactProperty\": { \"type\": \"Owner\" } } ``` ### Business Use Cases - **Role Changes**: Update a contact\'s role for a property (e.g., from tenant to owner) - **Relationship Type**: Modify the type of relationship between contact and property - **Status Updates**: Change relationship status or metadata - **Responsibility Transfer**: Update relationship when responsibilities change * Update a contact-property relationship */ async v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4Raw(requestParameters, initOverrides) { if (requestParameters['contactId'] == null) { throw new runtime.RequiredError('contactId', 'Required parameter "contactId" was null or undefined when calling v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4().'); } if (requestParameters['pid'] == null) { throw new runtime.RequiredError('pid', 'Required parameter "pid" was null or undefined when calling v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4().'); } if (requestParameters['v4ContactPropertyRelationsUpdateRelContactPropertyBodyDto'] == null) { throw new runtime.RequiredError('v4ContactPropertyRelationsUpdateRelContactPropertyBodyDto', 'Required parameter "v4ContactPropertyRelationsUpdateRelContactPropertyBodyDto" was null or undefined when calling v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4().'); } 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/contact-property-relations/contacts/{contactId}/properties/{pid}`; urlPath = urlPath.replace(`{${"contactId"}}`, encodeURIComponent(String(requestParameters['contactId']))); urlPath = urlPath.replace(`{${"pid"}}`, encodeURIComponent(String(requestParameters['pid']))); const response = await this.request({ path: urlPath, method: 'PATCH', headers: headerParameters, query: queryParameters, body: V4ContactPropertyRelationsUpdateRelContactPropertyBodyDtoToJSON(requestParameters['v4ContactPropertyRelationsUpdateRelContactPropertyBodyDto']), }, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => V4ContactPropertyRelationsUpdateRelContactPropertyResponseDtoFromJSON(jsonValue)); } /** * ## PATCH /v4/contact-property-relations/{contactId}/{pid} ### Overview Updates a specific contact-property relationship by its composite key. This endpoint allows you to modify the relationship type or other metadata associated with the contact-property connection. ### Authentication - **x-api-key**: Required API key for authentication - **organization-id**: Required organization identifier in header ### Path Parameters - **contactId** (number, required): Unique identifier for the contact - **pid** (string, required): Unique identifier for the property ### Request Body The request body should contain the fields to update within the relationship. #### Updateable Fields - **type** (string, optional): Type of relationship (e.g., \"Property Manager\", \"Owner\", \"Tenant\") ### Request Body Example ```json { \"relContactProperty\": { \"type\": \"Owner\" } } ``` ### Business Use Cases - **Role Changes**: Update a contact\'s role for a property (e.g., from tenant to owner) - **Relationship Type**: Modify the type of relationship between contact and property - **Status Updates**: Change relationship status or metadata - **Responsibility Transfer**: Update relationship when responsibilities change * Update a contact-property relationship */ async v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4(requestParameters, initOverrides) { const response = await this.v4ContactPropertyRelationsControllerUpdateRelContactPropertyV4Raw(requestParameters, initOverrides); return await response.value(); } }