/** * 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 { GetItemSearchFieldResponse } from '../models'; import { GetItemSearchResponse } from '../models'; /** * ItemSearchApi - axios parameter creator * @export */ export declare const ItemSearchApiAxiosParamCreator: (configuration?: Configuration) => { /** * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @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 {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. 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 100 is allowed. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ searchItem: (term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', limit?: number, cursor?: string) => Promise; /** * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded. * @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from * @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>. * @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} */ searchItemByField: (term: string, entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project', field: string, match?: 'exact' | 'beginning' | 'middle', limit?: number, cursor?: string) => Promise; }; /** * ItemSearchApi - functional programming interface * @export */ export declare const ItemSearchApiFp: (configuration?: Configuration) => { /** * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @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 {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} [item_types] A comma-separated string array. The type of items to perform the search from. Defaults to all. * @param {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {boolean} [search_for_related_items] When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization * @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {'deal.cc_email' | 'person.picture' | 'product.price'} [include_fields] A comma-separated string array. 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 100 is allowed. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @throws {RequiredError} */ searchItem(term: string, item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project', fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description', search_for_related_items?: boolean, exact_match?: boolean, include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {string} term The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded. * @param {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} entity_type The type of the field to perform the search from * @param {string} field The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @param {'exact' | 'beginning' | 'middle'} [match] The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>. * @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} */ searchItemByField(term: string, entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project', field: string, match?: 'exact' | 'beginning' | 'middle', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; }; /** * ItemSearchApi - factory interface * @export */ export declare const ItemSearchApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. * @throws {RequiredError} */ searchItem(requestParameters: ItemSearchApiSearchItemRequest): Promise; /** * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. * @throws {RequiredError} */ searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest): Promise; }; /** * Request parameters for searchItem operation in ItemSearchApi. * @export * @interface ItemSearchApiSearchItemRequest */ export interface ItemSearchApiSearchItemRequest { /** * 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 ItemSearchApiSearchItem */ readonly term: string; /** * A comma-separated string array. The type of items to perform the search from. Defaults to all. * @type {'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'} * @memberof ItemSearchApiSearchItem */ readonly item_types?: 'deal' | 'person' | 'organization' | 'product' | 'lead' | 'file' | 'mail_attachment' | 'project'; /** * A comma-separated string array. The fields to perform the search from. Defaults to all. Relevant for each item type are:<br> <table> <tr><th><b>Item type</b></th><th><b>Field</b></th></tr> <tr><td>Deal</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>Person</td><td>`custom_fields`, `email`, `name`, `notes`, `phone`</td></tr> <tr><td>Organization</td><td>`address`, `custom_fields`, `name`, `notes`</td></tr> <tr><td>Product</td><td>`code`, `custom_fields`, `name`</td></tr> <tr><td>Lead</td><td>`custom_fields`, `notes`, `title`</td></tr> <tr><td>File</td><td>`name`</td></tr> <tr><td>Mail attachment</td><td>`name`</td></tr> <tr><td>Project</td><td> `custom_fields`, `notes`, `title`, `description` </td></tr> </table> <br> Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @type {'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'} * @memberof ItemSearchApiSearchItem */ readonly fields?: 'address' | 'code' | 'custom_fields' | 'email' | 'name' | 'notes' | 'phone' | 'title' | 'description'; /** * When enabled, the response will include up to 100 newest related leads and 100 newest related deals for each found person and organization and up to 100 newest related persons for each found organization * @type {boolean} * @memberof ItemSearchApiSearchItem */ readonly search_for_related_items?: boolean; /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @type {boolean} * @memberof ItemSearchApiSearchItem */ readonly exact_match?: boolean; /** * A comma-separated string array. Supports including optional fields in the results which are not provided by default. * @type {'deal.cc_email' | 'person.picture' | 'product.price'} * @memberof ItemSearchApiSearchItem */ readonly include_fields?: 'deal.cc_email' | 'person.picture' | 'product.price'; /** * For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 100 is allowed. * @type {number} * @memberof ItemSearchApiSearchItem */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof ItemSearchApiSearchItem */ readonly cursor?: string; } /** * Request parameters for searchItemByField operation in ItemSearchApi. * @export * @interface ItemSearchApiSearchItemByFieldRequest */ export interface ItemSearchApiSearchItemByFieldRequest { /** * The search term to look for. Minimum 2 characters (or 1 if `match` is `exact`). Please note that the search term has to be URL encoded. * @type {string} * @memberof ItemSearchApiSearchItemByField */ readonly term: string; /** * The type of the field to perform the search from * @type {'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'} * @memberof ItemSearchApiSearchItemByField */ readonly entity_type: 'deal' | 'lead' | 'person' | 'organization' | 'product' | 'project'; /** * The key of the field to search from. The field key can be obtained by fetching the list of the fields using any of the fields\' API GET methods (dealFields, personFields, etc.). Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>. * @type {string} * @memberof ItemSearchApiSearchItemByField */ readonly field: string; /** * The type of match used against the term. The search <b>is</b> case sensitive.<br/><br/> E.g. in case of searching for a value `monkey`, <ul> <li>with `exact` match, you will only find it if term is `monkey`</li> <li>with `beginning` match, you will only find it if the term matches the beginning or the whole string, e.g. `monk` and `monkey`</li> <li>with `middle` match, you will find the it if the term matches any substring of the value, e.g. `onk` and `ke`</li> </ul>. * @type {'exact' | 'beginning' | 'middle'} * @memberof ItemSearchApiSearchItemByField */ readonly match?: 'exact' | 'beginning' | 'middle'; /** * 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 ItemSearchApiSearchItemByField */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof ItemSearchApiSearchItemByField */ readonly cursor?: string; } /** * ItemSearchApi - object-oriented interface * @export * @class ItemSearchApi * @extends {BaseAPI} */ export declare class ItemSearchApi extends BaseAPI { /** * Performs a search from your choice of item types and fields. * @summary Perform a search from multiple item types * @param {ItemSearchApiSearchItemRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof ItemSearchApi */ searchItem(requestParameters: ItemSearchApiSearchItemRequest): Promise; /** * Performs a search from the values of a specific field. Results can either be the distinct values of the field (useful for searching autocomplete field values), or the IDs of actual items (deals, leads, persons, organizations or products). * @summary Perform a search using a specific field from an item type * @param {ItemSearchApiSearchItemByFieldRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof ItemSearchApi */ searchItemByField(requestParameters: ItemSearchApiSearchItemByFieldRequest): Promise; }