/**
* Pipedrive API v2
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.0.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 type { Configuration } from '../configuration';
import type { AxiosInstance } from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { AddConvertLeadToDealResponse } from '../models';
import { ConvertLeadToDealRequest } from '../models';
import { GetConvertResponse1 } from '../models';
import { GetLeadSearchResponse } from '../models';
/**
* LeadsApi - axios parameter creator
* @export
*/
export declare const LeadsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint.
* @summary Convert a lead to a deal
* @param {string} id The ID of the lead to convert
* @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
* @throws {RequiredError}
*/
convertLeadToDeal: (id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest) => Promise;
/**
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Lead conversion status
* @param {string} id The ID of a lead
* @param {string} conversion_id The ID of the conversion
* @throws {RequiredError}
*/
getLeadConversionStatus: (id: string, conversion_id: string) => Promise;
/**
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
* @summary Search leads
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @param {number} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
* @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
* @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
* @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
* @throws {RequiredError}
*/
searchLeads: (term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string) => Promise;
};
/**
* LeadsApi - functional programming interface
* @export
*/
export declare const LeadsApiFp: (configuration?: Configuration) => {
/**
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint.
* @summary Convert a lead to a deal
* @param {string} id The ID of the lead to convert
* @param {ConvertLeadToDealRequest} [ConvertLeadToDealRequest]
* @throws {RequiredError}
*/
convertLeadToDeal(id: string, ConvertLeadToDealRequest?: ConvertLeadToDealRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Lead conversion status
* @param {string} id The ID of a lead
* @param {string} conversion_id The ID of the conversion
* @throws {RequiredError}
*/
getLeadConversionStatus(id: string, conversion_id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
* @summary Search leads
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @param {'custom_fields' | 'notes' | 'title'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them.
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @param {number} [person_id] Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
* @param {number} [organization_id] Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
* @param {'lead.was_seen'} [include_fields] Supports including optional fields in the results which are not provided by default
* @param {number} [limit] For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
* @throws {RequiredError}
*/
searchLeads(term: string, fields?: 'custom_fields' | 'notes' | 'title', exact_match?: boolean, person_id?: number, organization_id?: number, include_fields?: 'lead.was_seen', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
};
/**
* LeadsApi - factory interface
* @export
*/
export declare const LeadsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint.
* @summary Convert a lead to a deal
* @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise;
/**
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Lead conversion status
* @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise;
/**
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
* @summary Search leads
* @param {LeadsApiSearchLeadsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
searchLeads(requestParameters: LeadsApiSearchLeadsRequest): Promise;
};
/**
* Request parameters for convertLeadToDeal operation in LeadsApi.
* @export
* @interface LeadsApiConvertLeadToDealRequest
*/
export interface LeadsApiConvertLeadToDealRequest {
/**
* The ID of the lead to convert
* @type {string}
* @memberof LeadsApiConvertLeadToDeal
*/
readonly id: string;
/**
*
* @type {ConvertLeadToDealRequest}
* @memberof LeadsApiConvertLeadToDeal
*/
readonly ConvertLeadToDealRequest?: ConvertLeadToDealRequest;
}
/**
* Request parameters for getLeadConversionStatus operation in LeadsApi.
* @export
* @interface LeadsApiGetLeadConversionStatusRequest
*/
export interface LeadsApiGetLeadConversionStatusRequest {
/**
* The ID of a lead
* @type {string}
* @memberof LeadsApiGetLeadConversionStatus
*/
readonly id: string;
/**
* The ID of the conversion
* @type {string}
* @memberof LeadsApiGetLeadConversionStatus
*/
readonly conversion_id: string;
}
/**
* Request parameters for searchLeads operation in LeadsApi.
* @export
* @interface LeadsApiSearchLeadsRequest
*/
export interface LeadsApiSearchLeadsRequest {
/**
* The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @type {string}
* @memberof LeadsApiSearchLeads
*/
readonly term: string;
/**
* A comma-separated string array. The fields to perform the search from. Defaults to all of them.
* @type {'custom_fields' | 'notes' | 'title'}
* @memberof LeadsApiSearchLeads
*/
readonly fields?: 'custom_fields' | 'notes' | 'title';
/**
* When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @type {boolean}
* @memberof LeadsApiSearchLeads
*/
readonly exact_match?: boolean;
/**
* Will filter leads by the provided person ID. The upper limit of found leads associated with the person is 2000.
* @type {number}
* @memberof LeadsApiSearchLeads
*/
readonly person_id?: number;
/**
* Will filter leads by the provided organization ID. The upper limit of found leads associated with the organization is 2000.
* @type {number}
* @memberof LeadsApiSearchLeads
*/
readonly organization_id?: number;
/**
* Supports including optional fields in the results which are not provided by default
* @type {'lead.was_seen'}
* @memberof LeadsApiSearchLeads
*/
readonly include_fields?: 'lead.was_seen';
/**
* For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
* @type {number}
* @memberof LeadsApiSearchLeads
*/
readonly limit?: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof LeadsApiSearchLeads
*/
readonly cursor?: string;
}
/**
* LeadsApi - object-oriented interface
* @export
* @class LeadsApi
* @extends {BaseAPI}
*/
export declare class LeadsApi extends BaseAPI {
/**
* Initiates a conversion of a lead to a deal. The return value is an ID of a job that was assigned to perform the conversion. Related entities (notes, files, emails, activities, ...) are transferred during the process to the target entity. If the conversion is successful, the lead is marked as deleted. To retrieve the created entity ID and the result of the conversion, call the /api/v2/leads/{lead_id}/convert/status/{conversion_id} endpoint.
* @summary Convert a lead to a deal
* @param {LeadsApiConvertLeadToDealRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof LeadsApi
*/
convertLeadToDeal(requestParameters: LeadsApiConvertLeadToDealRequest): Promise;
/**
* Returns data about the conversion. Status is always present and its value (not_started, running, completed, failed, rejected) represents the current state of the conversion. Deal ID is only present if the conversion was successfully finished. This data is only temporary and removed after a few days.
* @summary Get Lead conversion status
* @param {LeadsApiGetLeadConversionStatusRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof LeadsApi
*/
getLeadConversionStatus(requestParameters: LeadsApiGetLeadConversionStatusRequest): Promise;
/**
* Searches all leads by title, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found leads can be filtered by the person ID and the organization ID.
* @summary Search leads
* @param {LeadsApiSearchLeadsRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof LeadsApi
*/
searchLeads(requestParameters: LeadsApiSearchLeadsRequest): Promise;
}