@planet-a/affinity-node
Version:
API wrapper for the affinity.co API
91 lines (90 loc) • 7.66 kB
TypeScript
import { BaseAPIRequestFactory } from './baseapi.js';
import { Configuration } from '../configuration.js';
import { RequestContext, ResponseContext, HttpInfo } from '../http/http.js';
import { PersonMergeRequest } from '../models/PersonMergeRequest.js';
import { PersonMergeResponse } from '../models/PersonMergeResponse.js';
import { PersonMergeState } from '../models/PersonMergeState.js';
import { PersonMergeStatePaged } from '../models/PersonMergeStatePaged.js';
import { PersonMergeTask } from '../models/PersonMergeTask.js';
import { PersonMergeTaskPaged } from '../models/PersonMergeTaskPaged.js';
/**
* no description
*/
export declare class PersonMergesApiRequestFactory extends BaseAPIRequestFactory {
/**
* Retrieve paginated person merges for the organization. Returns all person merges initiated by users in your organization, including their current status, the persons involved, and merge details. You can filter person 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` | Person 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 Person Merges
* @param cursor Cursor for the next or previous page
* @param limit Number of items to include in the page
* @param filter Filter person merges using Affinity Filtering Language
*/
v2PersonMergesGET(cursor?: string, limit?: number, filter?: string, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve the status and details of a specific person merge. Returns information about the person merge including its current status, the persons involved, timestamps, and any error information if the merge failed. The `mergeId` can be obtained from the response of the [Get All Person Merges](#tag/personMerges/operation/v2_person-merges__GET) endpoint, or by filtering person merges by task ID using `/v2/person-merges?filter=taskId={taskId}` after initiating a merge. Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Get Person Merge
* @param mergeId Person merge ID
*/
v2PersonMergesMergeIdGET(mergeId: number, _options?: Configuration): Promise<RequestContext>;
/**
* Initiate a person merge to combine a duplicate person profile into a primary person profile. This is an asynchronous process that will merge all data from the duplicate person into the primary person. Once the merge is initiated, you can track its progress using the returned [task URL](#tag/personMerges/operation/v2_tasks_person-merges_taskId__GET). Requires the \"Manage duplicates\" [permission](#section/Getting-Started/Permissions) and organization admin role.
* Initiate Person Merge
* @param personMergeRequest
*/
v2PersonMergesPOST(personMergeRequest: PersonMergeRequest, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve paginated person merge tasks for the organization. Returns all merge tasks initiated by users in your organization, including their current status, the persons 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 Person 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
*/
v2TasksPersonMergesGET(cursor?: string, limit?: number, filter?: string, _options?: Configuration): Promise<RequestContext>;
/**
* Retrieve the status and details of a specific task for person merges. Returns information about the person 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/person-merges?filter=taskId={taskId}` See [Person Merges](#tag/personMerges/operation/v2_person-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 Person Merge Task
* @param taskId Person merge task ID
*/
v2TasksPersonMergesTaskIdGET(taskId: string, _options?: Configuration): Promise<RequestContext>;
}
export declare class PersonMergesApiResponseProcessor {
/**
* 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 v2PersonMergesGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2PersonMergesGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonMergeStatePaged>>;
/**
* 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 v2PersonMergesMergeIdGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2PersonMergesMergeIdGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonMergeState>>;
/**
* 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 v2PersonMergesPOST
* @throws ApiException if the response code was not in [200, 299]
*/
v2PersonMergesPOSTWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonMergeResponse>>;
/**
* 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 v2TasksPersonMergesGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2TasksPersonMergesGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonMergeTaskPaged>>;
/**
* 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 v2TasksPersonMergesTaskIdGET
* @throws ApiException if the response code was not in [200, 299]
*/
v2TasksPersonMergesTaskIdGETWithHttpInfo(response: ResponseContext): Promise<HttpInfo<PersonMergeTask>>;
}