@planet-a/affinity-node
Version:
API wrapper for the affinity.co API
91 lines (90 loc) • 7.74 kB
TypeScript
import { BaseAPIRequestFactory } from './baseapi.js';
import { Configuration } from '../configuration.js';
import { RequestContext, ResponseContext, HttpInfo } from '../http/http.js';
import { CompanyMergeRequest } from '../models/CompanyMergeRequest.js';
import { CompanyMergeResponse } from '../models/CompanyMergeResponse.js';
import { CompanyMergeState } from '../models/CompanyMergeState.js';
import { CompanyMergeStatePaged } from '../models/CompanyMergeStatePaged.js';
import { CompanyMergeTask } from '../models/CompanyMergeTask.js';
import { CompanyMergeTaskPaged } from '../models/CompanyMergeTaskPaged.js';
/**
* no description
*/
export declare class CompanyMergesApiRequestFactory extends BaseAPIRequestFactory {
/**
* Retrieve paginated company merges for the organization. Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | | `taskId` | `string` | `=` | | `taskId=789e0123-e45b-67c8-d901-234567890123` | Company merges are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merges
* @param cursor Cursor for the next or previous page
* @param limit Number of items to include in the page
* @param filter Filter company merges using Affinity Filtering Language
*/
v2CompanyMergesGET(cursor?: string, limit?: number, filter?: string, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve the status and details of a specific company merge. Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) endpoint, or by filtering company merges by task ID using `/v2/company-merges?filter=taskId={taskId}` after initiating a merge. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge
* @param mergeId Company merge ID
*/
v2CompanyMergesMergeIdGET(mergeId: number, _options?: Configuration): Promise<RequestContext>;
/**
* Initiate a company merge to combine a duplicate company profile into a primary company profile. This is an asynchronous process that will merge all data from the duplicate company into the primary company. Once the merge is initiated, you can track its progress using the returned [task URL](#tag/companyMerges/operation/v2_tasks_company-merges_taskId__GET). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Initiate Company Merge
* @param companyMergeRequest
*/
v2CompanyMergesPOST(companyMergeRequest: CompanyMergeRequest, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve paginated company merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the companies involved, and task details. You can filter tasks using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties: | Property | Type | Operators | Values | Examples | |----------|------|-----------|--------|----------| | `status` | `enum` | `=` | `in-progress`, `success`, `failed` | `status=failed` | Tasks are returned in reverse chronological order (most recent first). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get All Company Merge Tasks
* @param cursor Cursor for the next or previous page
* @param limit Number of items to include in the page
* @param filter Filter tasks using Affinity Filtering Language
*/
v2TasksCompanyMergesGET(cursor?: string, limit?: number, filter?: string, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve the status and details of a specific task for company merges. Returns information about the company merges for a specific task including its overall status, number of merges in-progress, completed, and failed. Detailed information about individual merges for this task can be found by querying: `/v2/company-merges?filter=taskId={taskId}` See [Company Merges](#tag/companyMerges/operation/v2_company-merges__GET) for more details. Task statuses: - `in-progress`: The merge task is currently being processed. - `success`: The merge task completed successfully. - `failed`: The merge task failed. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Company Merge Task
* @param taskId Company merge task ID
*/
v2TasksCompanyMergesTaskIdGET(taskId: string, _options?: Configuration): Promise<RequestContext>;
}
export declare class CompanyMergesApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to v2CompanyMergesGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2CompanyMergesGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyMergeStatePaged>>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to v2CompanyMergesMergeIdGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2CompanyMergesMergeIdGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyMergeState>>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to v2CompanyMergesPOST
* @throws ApiException if the response code was not in [200, 299]
*/
v2CompanyMergesPOSTWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyMergeResponse>>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to v2TasksCompanyMergesGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2TasksCompanyMergesGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyMergeTaskPaged>>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to v2TasksCompanyMergesTaskIdGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2TasksCompanyMergesTaskIdGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<CompanyMergeTask>>;
}