/** * 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 { AddDealFollowerRequest } from '../models'; import { AddFollowerResponse } from '../models'; import { AddPersonRequest } from '../models'; import { DeleteFollowerResponse } from '../models'; import { DeletePersonResponse } from '../models'; import { GetFollowerChangelogsResponse } from '../models'; import { GetFollowersResponse } from '../models'; import { GetPersonPictureResponse } from '../models'; import { GetPersonSearchResponse } from '../models'; import { GetPersonsResponse } from '../models'; import { UpsertPersonResponse } from '../models'; /** * PersonsApi - axios parameter creator * @export */ export declare const PersonsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ addPerson: (AddPersonRequest?: AddPersonRequest) => Promise; /** * Adds a user as a follower to the person. * @summary Add a follower to a person * @param {number} id The ID of the person * @param {AddDealFollowerRequest} [AddDealFollowerRequest] * @throws {RequiredError} */ addPersonFollower: (id: number, AddDealFollowerRequest?: AddDealFollowerRequest) => Promise; /** * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {number} id The ID of the person * @throws {RequiredError} */ deletePerson: (id: number) => Promise; /** * Deletes a user follower from the person. * @summary Delete a follower from a person * @param {number} id The ID of the person * @param {number} follower_id The ID of the following user * @throws {RequiredError} */ deletePersonFollower: (id: number, follower_id: number) => Promise; /** * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {number} id The ID of the person * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ getPerson: (id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean) => Promise; /** * Lists users who are following the person. * @summary List followers of a person * @param {number} id The ID of the person * @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} */ getPersonFollowers: (id: number, limit?: number, cursor?: string) => Promise; /** * Lists changelogs about users have followed the person. * @summary List followers changelog of a person * @param {number} id The ID of the person * @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} */ getPersonFollowersChangelog: (id: number, limit?: number, cursor?: string) => Promise; /** * Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions. * @summary Get picture of a person * @param {number} id The ID of the person * @throws {RequiredError} */ getPersonPicture: (id: number) => Promise; /** * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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} */ getPersons: (filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string) => Promise; /** * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @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' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. 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} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. * @param {'person.picture'} [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} */ searchPersons: (term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string) => Promise; /** * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {number} id The ID of the person * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ updatePerson: (id: number, AddPersonRequest?: AddPersonRequest) => Promise; }; /** * PersonsApi - functional programming interface * @export */ export declare const PersonsApiFp: (configuration?: Configuration) => { /** * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Add a new person * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ addPerson(AddPersonRequest?: AddPersonRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Adds a user as a follower to the person. * @summary Add a follower to a person * @param {number} id The ID of the person * @param {AddDealFollowerRequest} [AddDealFollowerRequest] * @throws {RequiredError} */ addPersonFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {number} id The ID of the person * @throws {RequiredError} */ deletePerson(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Deletes a user follower from the person. * @summary Delete a follower from a person * @param {number} id The ID of the person * @param {number} follower_id The ID of the following user * @throws {RequiredError} */ deletePersonFollower(id: number, follower_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {number} id The ID of the person * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @throws {RequiredError} */ getPerson(id: number, include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Lists users who are following the person. * @summary List followers of a person * @param {number} id The ID of the person * @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} */ getPersonFollowers(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Lists changelogs about users have followed the person. * @summary List followers changelog of a person * @param {number} id The ID of the person * @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} */ getPersonFollowersChangelog(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions. * @summary Get picture of a person * @param {number} id The ID of the person * @throws {RequiredError} */ getPersonPicture(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {number} [filter_id] If supplied, only persons matching the specified filter are returned * @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @param {number} [owner_id] If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. * @param {number} [org_id] If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored. * @param {number} [deal_id] If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored. * @param {string} [updated_since] If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {string} [updated_until] If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @param {'id' | 'update_time' | 'add_time'} [sort_by] The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @param {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} [include_fields] Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @param {string} [custom_fields] Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @param {boolean} [include_option_labels] When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @param {boolean} [include_labels] When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @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} */ getPersons(filter_id?: number, ids?: string, owner_id?: number, org_id?: number, deal_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email', custom_fields?: string, include_option_labels?: boolean, include_labels?: boolean, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @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' | 'email' | 'notes' | 'phone' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. 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} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @param {number} [organization_id] Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. * @param {'person.picture'} [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} */ searchPersons(term: string, fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name', exact_match?: boolean, organization_id?: number, include_fields?: 'person.picture', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {number} id The ID of the person * @param {AddPersonRequest} [AddPersonRequest] * @throws {RequiredError} */ updatePerson(id: number, AddPersonRequest?: AddPersonRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; }; /** * PersonsApi - factory interface * @export */ export declare const PersonsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. * @throws {RequiredError} */ addPerson(requestParameters?: PersonsApiAddPersonRequest): Promise; /** * Adds a user as a follower to the person. * @summary Add a follower to a person * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters. * @throws {RequiredError} */ addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest): Promise; /** * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. * @throws {RequiredError} */ deletePerson(requestParameters: PersonsApiDeletePersonRequest): Promise; /** * Deletes a user follower from the person. * @summary Delete a follower from a person * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters. * @throws {RequiredError} */ deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest): Promise; /** * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. * @throws {RequiredError} */ getPerson(requestParameters: PersonsApiGetPersonRequest): Promise; /** * Lists users who are following the person. * @summary List followers of a person * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters. * @throws {RequiredError} */ getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest): Promise; /** * Lists changelogs about users have followed the person. * @summary List followers changelog of a person * @param {PersonsApiGetPersonFollowersChangelogRequest} requestParameters Request parameters. * @throws {RequiredError} */ getPersonFollowersChangelog(requestParameters: PersonsApiGetPersonFollowersChangelogRequest): Promise; /** * Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions. * @summary Get picture of a person * @param {PersonsApiGetPersonPictureRequest} requestParameters Request parameters. * @throws {RequiredError} */ getPersonPicture(requestParameters: PersonsApiGetPersonPictureRequest): Promise; /** * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. * @throws {RequiredError} */ getPersons(requestParameters?: PersonsApiGetPersonsRequest): Promise; /** * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. * @throws {RequiredError} */ searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise; /** * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. * @throws {RequiredError} */ updatePerson(requestParameters: PersonsApiUpdatePersonRequest): Promise; }; /** * Request parameters for addPerson operation in PersonsApi. * @export * @interface PersonsApiAddPersonRequest */ export interface PersonsApiAddPersonRequest { /** * * @type {AddPersonRequest} * @memberof PersonsApiAddPerson */ readonly AddPersonRequest?: AddPersonRequest; } /** * Request parameters for addPersonFollower operation in PersonsApi. * @export * @interface PersonsApiAddPersonFollowerRequest */ export interface PersonsApiAddPersonFollowerRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiAddPersonFollower */ readonly id: number; /** * * @type {AddDealFollowerRequest} * @memberof PersonsApiAddPersonFollower */ readonly AddDealFollowerRequest?: AddDealFollowerRequest; } /** * Request parameters for deletePerson operation in PersonsApi. * @export * @interface PersonsApiDeletePersonRequest */ export interface PersonsApiDeletePersonRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiDeletePerson */ readonly id: number; } /** * Request parameters for deletePersonFollower operation in PersonsApi. * @export * @interface PersonsApiDeletePersonFollowerRequest */ export interface PersonsApiDeletePersonFollowerRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiDeletePersonFollower */ readonly id: number; /** * The ID of the following user * @type {number} * @memberof PersonsApiDeletePersonFollower */ readonly follower_id: number; } /** * Request parameters for getPerson operation in PersonsApi. * @export * @interface PersonsApiGetPersonRequest */ export interface PersonsApiGetPersonRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiGetPerson */ readonly id: number; /** * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} * @memberof PersonsApiGetPerson */ readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'; /** * Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @type {string} * @memberof PersonsApiGetPerson */ readonly custom_fields?: string; /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @type {boolean} * @memberof PersonsApiGetPerson */ readonly include_option_labels?: boolean; /** * When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @type {boolean} * @memberof PersonsApiGetPerson */ readonly include_labels?: boolean; } /** * Request parameters for getPersonFollowers operation in PersonsApi. * @export * @interface PersonsApiGetPersonFollowersRequest */ export interface PersonsApiGetPersonFollowersRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiGetPersonFollowers */ readonly id: number; /** * 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 PersonsApiGetPersonFollowers */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof PersonsApiGetPersonFollowers */ readonly cursor?: string; } /** * Request parameters for getPersonFollowersChangelog operation in PersonsApi. * @export * @interface PersonsApiGetPersonFollowersChangelogRequest */ export interface PersonsApiGetPersonFollowersChangelogRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiGetPersonFollowersChangelog */ readonly id: number; /** * 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 PersonsApiGetPersonFollowersChangelog */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof PersonsApiGetPersonFollowersChangelog */ readonly cursor?: string; } /** * Request parameters for getPersonPicture operation in PersonsApi. * @export * @interface PersonsApiGetPersonPictureRequest */ export interface PersonsApiGetPersonPictureRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiGetPersonPicture */ readonly id: number; } /** * Request parameters for getPersons operation in PersonsApi. * @export * @interface PersonsApiGetPersonsRequest */ export interface PersonsApiGetPersonsRequest { /** * If supplied, only persons matching the specified filter are returned * @type {number} * @memberof PersonsApiGetPersons */ readonly filter_id?: number; /** * Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. * @type {string} * @memberof PersonsApiGetPersons */ readonly ids?: string; /** * If supplied, only persons owned by the specified user are returned. If filter_id is provided, this is ignored. * @type {number} * @memberof PersonsApiGetPersons */ readonly owner_id?: number; /** * If supplied, only persons linked to the specified organization are returned. If filter_id is provided, this is ignored. * @type {number} * @memberof PersonsApiGetPersons */ readonly org_id?: number; /** * If supplied, only persons linked to the specified deal are returned. If filter_id is provided, this is ignored. * @type {number} * @memberof PersonsApiGetPersons */ readonly deal_id?: number; /** * If set, only persons with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @type {string} * @memberof PersonsApiGetPersons */ readonly updated_since?: string; /** * If set, only persons with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. * @type {string} * @memberof PersonsApiGetPersons */ readonly updated_until?: string; /** * The field to sort by. Supported fields: `id`, `update_time`, `add_time`. * @type {'id' | 'update_time' | 'add_time'} * @memberof PersonsApiGetPersons */ readonly sort_by?: 'id' | 'update_time' | 'add_time'; /** * The sorting direction. Supported values: `asc`, `desc`. * @type {'asc' | 'desc'} * @memberof PersonsApiGetPersons */ readonly sort_direction?: 'asc' | 'desc'; /** * Optional comma separated string array of additional fields to include. `marketing_status` and `doi_status` can only be included if the company has marketing app enabled. * @type {'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'} * @memberof PersonsApiGetPersons */ readonly include_fields?: 'next_activity_id' | 'last_activity_id' | 'open_deals_count' | 'related_open_deals_count' | 'closed_deals_count' | 'related_closed_deals_count' | 'participant_open_deals_count' | 'participant_closed_deals_count' | 'email_messages_count' | 'activities_count' | 'done_activities_count' | 'undone_activities_count' | 'files_count' | 'notes_count' | 'followers_count' | 'won_deals_count' | 'related_won_deals_count' | 'lost_deals_count' | 'related_lost_deals_count' | 'last_incoming_mail_time' | 'last_outgoing_mail_time' | 'marketing_status' | 'doi_status' | 'smart_bcc_email'; /** * Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. * @type {string} * @memberof PersonsApiGetPersons */ readonly custom_fields?: string; /** * When provided with a \'true\' value, single option and multiple option custom fields values contain objects in the form of \'{ id: number, label: string }\' instead of plain id * @type {boolean} * @memberof PersonsApiGetPersons */ readonly include_option_labels?: boolean; /** * When provided with \'true\' value, response will include an array of label objects in the form of \'{ id: number, label: string }\' * @type {boolean} * @memberof PersonsApiGetPersons */ readonly include_labels?: boolean; /** * 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 PersonsApiGetPersons */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof PersonsApiGetPersons */ readonly cursor?: string; } /** * Request parameters for searchPersons operation in PersonsApi. * @export * @interface PersonsApiSearchPersonsRequest */ export interface PersonsApiSearchPersonsRequest { /** * 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 PersonsApiSearchPersons */ readonly term: string; /** * A comma-separated string array. The fields to perform the search from. Defaults to all of them. 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 {'custom_fields' | 'email' | 'notes' | 'phone' | 'name'} * @memberof PersonsApiSearchPersons */ readonly fields?: 'custom_fields' | 'email' | 'notes' | 'phone' | 'name'; /** * When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive. * @type {boolean} * @memberof PersonsApiSearchPersons */ readonly exact_match?: boolean; /** * Will filter persons by the provided organization ID. The upper limit of found persons associated with the organization is 2000. * @type {number} * @memberof PersonsApiSearchPersons */ readonly organization_id?: number; /** * Supports including optional fields in the results which are not provided by default * @type {'person.picture'} * @memberof PersonsApiSearchPersons */ readonly include_fields?: 'person.picture'; /** * 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 PersonsApiSearchPersons */ readonly limit?: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof PersonsApiSearchPersons */ readonly cursor?: string; } /** * Request parameters for updatePerson operation in PersonsApi. * @export * @interface PersonsApiUpdatePersonRequest */ export interface PersonsApiUpdatePersonRequest { /** * The ID of the person * @type {number} * @memberof PersonsApiUpdatePerson */ readonly id: number; /** * * @type {AddPersonRequest} * @memberof PersonsApiUpdatePerson */ readonly AddPersonRequest?: AddPersonRequest; } /** * PersonsApi - object-oriented interface * @export * @class PersonsApi * @extends {BaseAPI} */ export declare class PersonsApi extends BaseAPI { /** * Adds a new person. If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Add a new person * @param {PersonsApiAddPersonRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ addPerson(requestParameters?: PersonsApiAddPersonRequest): Promise; /** * Adds a user as a follower to the person. * @summary Add a follower to a person * @param {PersonsApiAddPersonFollowerRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ addPersonFollower(requestParameters: PersonsApiAddPersonFollowerRequest): Promise; /** * Marks a person as deleted. After 30 days, the person will be permanently deleted. * @summary Delete a person * @param {PersonsApiDeletePersonRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ deletePerson(requestParameters: PersonsApiDeletePersonRequest): Promise; /** * Deletes a user follower from the person. * @summary Delete a follower from a person * @param {PersonsApiDeletePersonFollowerRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ deletePersonFollower(requestParameters: PersonsApiDeletePersonFollowerRequest): Promise; /** * Returns the details of a specific person. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get details of a person * @param {PersonsApiGetPersonRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ getPerson(requestParameters: PersonsApiGetPersonRequest): Promise; /** * Lists users who are following the person. * @summary List followers of a person * @param {PersonsApiGetPersonFollowersRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ getPersonFollowers(requestParameters: PersonsApiGetPersonFollowersRequest): Promise; /** * Lists changelogs about users have followed the person. * @summary List followers changelog of a person * @param {PersonsApiGetPersonFollowersChangelogRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ getPersonFollowersChangelog(requestParameters: PersonsApiGetPersonFollowersChangelogRequest): Promise; /** * Returns the picture associated with a person. The picture URLs include both 128x128 and 512x512 pixel versions. * @summary Get picture of a person * @param {PersonsApiGetPersonPictureRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ getPersonPicture(requestParameters: PersonsApiGetPersonPictureRequest): Promise; /** * Returns data about all persons. Fields `ims`, `postal_address`, `notes`, `birthday`, and `job_title` are only included if contact sync is enabled for the company. * @summary Get all persons * @param {PersonsApiGetPersonsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ getPersons(requestParameters?: PersonsApiGetPersonsRequest): Promise; /** * Searches all persons by name, email, phone, notes and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope. Found persons can be filtered by organization ID. * @summary Search persons * @param {PersonsApiSearchPersonsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ searchPersons(requestParameters: PersonsApiSearchPersonsRequest): Promise; /** * Updates the properties of a person.
If the company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `marketing_status` field. * @summary Update a person * @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof PersonsApi */ updatePerson(requestParameters: PersonsApiUpdatePersonRequest): Promise; }