Skip to content

Commit cee1b32

Browse files
author
pipedrive-bot
committed
Build 337 - version-minor
1 parent 34ebca5 commit cee1b32

14 files changed

Lines changed: 274 additions & 83 deletions

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
77
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
88

99
## [Unreleased]
10+
### Added
11+
- Added `website`, `linkedin`, `industry`, `annual_revenue`, and `employee_count` as writable fields to v2 organization request body (`POST /api/v2/organizations`, `PATCH /api/v2/organizations/{id}`)
12+
- Added `postal_address`, `notes`, `im`, `birthday`, and `job_title` as writable fields to v2 person request body (`POST /api/v2/persons`, `PATCH /api/v2/persons/{id}`) — these fields don't exist by default and are only created when contact sync is set up for the company
13+
- Updated `POST /api/v2/persons` and `PATCH /api/v2/persons/{id}` descriptions to clarify that the `im`, `postal_address`, `notes`, `birthday`, and `job_title` fields require contact sync to be set up
14+
### Fixed
15+
- Removed `update_time` from `POST /api/v2/organizations` and `POST /api/v2/persons` request body schemas, and removed `add_time`/`update_time` from `PATCH /api/v2/organizations/{id}` and `PATCH /api/v2/persons/{id}` request body schemas — these are server-generated fields that were never meant to be accepted as input
16+
- Added missing example values for `website`, `linkedin`, `industry`, `annual_revenue`, and `employee_count` to the v2 organization response example
1017

1118
## [33.5.0] - 2026-07-23
1219
### Added

src/versions/v1/common.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import { Configuration } from "./configuration";
1717
import { RequiredError, RequestArgs } from "./base";
18-
import { AxiosInstance, AxiosResponse } from 'axios';
18+
import type { AxiosInstance, AxiosResponse } from 'axios';
1919

2020
/**
2121
*
@@ -87,17 +87,17 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
8787
if (typeof parameter === "object") {
8888
if (Array.isArray(parameter)) {
8989
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
90-
}
90+
}
9191
else {
92-
Object.keys(parameter).forEach(currentKey =>
92+
Object.keys(parameter).forEach(currentKey =>
9393
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
9494
);
9595
}
96-
}
96+
}
9797
else {
9898
if (urlSearchParams.has(key)) {
9999
urlSearchParams.append(key, parameter);
100-
}
100+
}
101101
else {
102102
urlSearchParams.set(key, parameter);
103103
}
@@ -141,8 +141,10 @@ export const toPathString = function (url: URL) {
141141
* @export
142142
*/
143143
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
144-
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
144+
// Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
145+
// which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
146+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
145147
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
146-
return axios.request<T, R>(axiosRequestArgs);
148+
return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
147149
};
148150
}

src/versions/v2/api/persons-api.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ import { GetPersonSearchResponse } from '../models';
4242
// @ts-ignore
4343
import { GetPersonsResponse } from '../models';
4444
// @ts-ignore
45+
import { UpdatePersonRequest } from '../models';
46+
// @ts-ignore
4547
import { UpsertPersonResponse } from '../models';
4648
/**
4749
* PersonsApi - axios parameter creator
@@ -50,7 +52,7 @@ import { UpsertPersonResponse } from '../models';
5052
export const PersonsApiAxiosParamCreator = function (configuration?: Configuration) {
5153
return {
5254
/**
53-
* 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.
55+
* Adds a new person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
5456
* @summary Add a new person
5557
* @param {AddPersonRequest} [AddPersonRequest]
5658
@@ -612,14 +614,14 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
612614
};
613615
},
614616
/**
615-
* Updates the properties of a person. <br>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.
617+
* Updates the properties of a person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
616618
* @summary Update a person
617619
* @param {number} id The ID of the person
618-
* @param {AddPersonRequest} [AddPersonRequest]
620+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
619621
620622
* @throws {RequiredError}
621623
*/
622-
updatePerson: async (id: number, AddPersonRequest?: AddPersonRequest, ): Promise<RequestArgs> => {
624+
updatePerson: async (id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise<RequestArgs> => {
623625
// verify required parameter 'id' is not null or undefined
624626
assertParamExists('updatePerson', 'id', id)
625627
const localVarPath = `/persons/{id}`
@@ -649,7 +651,7 @@ export const PersonsApiAxiosParamCreator = function (configuration?: Configurati
649651
setSearchParams(localVarUrlObj, localVarQueryParameter);
650652
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
651653
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, };
652-
localVarRequestOptions.data = serializeDataIfNeeded(AddPersonRequest, localVarRequestOptions, configuration)
654+
localVarRequestOptions.data = serializeDataIfNeeded(UpdatePersonRequest, localVarRequestOptions, configuration)
653655

654656
return {
655657
url: toPathString(localVarUrlObj),
@@ -668,7 +670,7 @@ export const PersonsApiFp = function(configuration?: Configuration) {
668670
const localVarAxiosParamCreator = PersonsApiAxiosParamCreator(configuration)
669671
return {
670672
/**
671-
* 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.
673+
* Adds a new person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
672674
* @summary Add a new person
673675
* @param {AddPersonRequest} [AddPersonRequest]
674676
@@ -808,15 +810,15 @@ export const PersonsApiFp = function(configuration?: Configuration) {
808810
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
809811
},
810812
/**
811-
* Updates the properties of a person. <br>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.
813+
* Updates the properties of a person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
812814
* @summary Update a person
813815
* @param {number} id The ID of the person
814-
* @param {AddPersonRequest} [AddPersonRequest]
816+
* @param {UpdatePersonRequest} [UpdatePersonRequest]
815817
816818
* @throws {RequiredError}
817819
*/
818-
async updatePerson(id: number, AddPersonRequest?: AddPersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpsertPersonResponse>> {
819-
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, AddPersonRequest, );
820+
async updatePerson(id: number, UpdatePersonRequest?: UpdatePersonRequest, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<UpsertPersonResponse>> {
821+
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePerson(id, UpdatePersonRequest, );
820822
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
821823
},
822824
}
@@ -830,7 +832,7 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
830832
const localVarFp = PersonsApiFp(configuration)
831833
return {
832834
/**
833-
* 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.
835+
* Adds a new person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
834836
* @summary Add a new person
835837
* @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
836838
@@ -930,14 +932,14 @@ export const PersonsApiFactory = function (configuration?: Configuration, basePa
930932
return localVarFp.searchPersons(requestParameters.term, requestParameters.fields, requestParameters.exact_match, requestParameters.organization_id, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
931933
},
932934
/**
933-
* Updates the properties of a person. <br>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.
935+
* Updates the properties of a person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
934936
* @summary Update a person
935937
* @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
936938
937939
* @throws {RequiredError}
938940
*/
939941
updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ): Promise<UpsertPersonResponse> {
940-
return localVarFp.updatePerson(requestParameters.id, requestParameters.AddPersonRequest, ).then((request) => request(axios, basePath));
942+
return localVarFp.updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(axios, basePath));
941943
},
942944
};
943945
};
@@ -1307,10 +1309,10 @@ export interface PersonsApiUpdatePersonRequest {
13071309

13081310
/**
13091311
*
1310-
* @type {AddPersonRequest}
1312+
* @type {UpdatePersonRequest}
13111313
* @memberof PersonsApiUpdatePerson
13121314
*/
1313-
readonly AddPersonRequest?: AddPersonRequest
1315+
readonly UpdatePersonRequest?: UpdatePersonRequest
13141316
}
13151317

13161318
/**
@@ -1321,7 +1323,7 @@ export interface PersonsApiUpdatePersonRequest {
13211323
*/
13221324
export class PersonsApi extends BaseAPI {
13231325
/**
1324-
* 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.
1326+
* Adds a new person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
13251327
* @summary Add a new person
13261328
* @param {PersonsApiAddPersonRequest} requestParameters Request parameters.
13271329
@@ -1441,14 +1443,14 @@ export class PersonsApi extends BaseAPI {
14411443
}
14421444

14431445
/**
1444-
* Updates the properties of a person. <br>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.
1446+
* Updates the properties of a person. <br>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. <br>The `im`, `postal_address`, `notes`, `birthday` and `job_title` fields don’t exist by default in Pipedrive and are only created when you set up your contact sync.
14451447
* @summary Update a person
14461448
* @param {PersonsApiUpdatePersonRequest} requestParameters Request parameters.
14471449
14481450
* @throws {RequiredError}
14491451
* @memberof PersonsApi
14501452
*/
14511453
public updatePerson(requestParameters: PersonsApiUpdatePersonRequest, ) {
1452-
return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.AddPersonRequest, ).then((request) => request(this.axios, this.basePath));
1454+
return PersonsApiFp(this.configuration).updatePerson(requestParameters.id, requestParameters.UpdatePersonRequest, ).then((request) => request(this.axios, this.basePath));
14531455
}
14541456
}

src/versions/v2/common.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
import { Configuration } from "./configuration";
1717
import { RequiredError, RequestArgs } from "./base";
18-
import { AxiosInstance, AxiosResponse } from 'axios';
18+
import type { AxiosInstance, AxiosResponse } from 'axios';
1919

2020
/**
2121
*
@@ -87,17 +87,17 @@ function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: an
8787
if (typeof parameter === "object") {
8888
if (Array.isArray(parameter)) {
8989
(parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
90-
}
90+
}
9191
else {
92-
Object.keys(parameter).forEach(currentKey =>
92+
Object.keys(parameter).forEach(currentKey =>
9393
setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`)
9494
);
9595
}
96-
}
96+
}
9797
else {
9898
if (urlSearchParams.has(key)) {
9999
urlSearchParams.append(key, parameter);
100-
}
100+
}
101101
else {
102102
urlSearchParams.set(key, parameter);
103103
}
@@ -141,8 +141,10 @@ export const toPathString = function (url: URL) {
141141
* @export
142142
*/
143143
export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) {
144-
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
144+
// Explicit return type + cast avoid inferring axios's internal AxiosResponseResult type,
145+
// which references a module-private `unique symbol` and breaks `tsc --declaration` (TS2742).
146+
return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => {
145147
const axiosRequestArgs = {...axiosArgs.options, url: (configuration?.basePath || basePath) + axiosArgs.url};
146-
return axios.request<T, R>(axiosRequestArgs);
148+
return axios.request<T, R>(axiosRequestArgs) as Promise<R>;
147149
};
148150
}

src/versions/v2/models/add-organization-request.ts

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface AddOrganizationRequest {
2727
* The name of the organization
2828
* @type {string}
2929
*/
30-
'name'?: string;
30+
'name': string;
3131
/**
3232
* The ID of the user who owns the organization
3333
* @type {number}
@@ -39,11 +39,6 @@ export interface AddOrganizationRequest {
3939
*/
4040
'add_time'?: string;
4141
/**
42-
* The last updated date and time of the organization
43-
* @type {string}
44-
*/
45-
'update_time'?: string;
46-
/**
4742
* The visibility of the organization
4843
* @type {number}
4944
*/
@@ -59,6 +54,31 @@ export interface AddOrganizationRequest {
5954
*/
6055
'address'?: OrganizationItemAddress;
6156
/**
57+
* The website of the organization
58+
* @type {string}
59+
*/
60+
'website'?: string | null;
61+
/**
62+
* The LinkedIn profile URL of the organization
63+
* @type {string}
64+
*/
65+
'linkedin'?: string | null;
66+
/**
67+
* The industry the organization belongs to
68+
* @type {number}
69+
*/
70+
'industry'?: number | null;
71+
/**
72+
* The annual revenue of the organization
73+
* @type {number}
74+
*/
75+
'annual_revenue'?: number | null;
76+
/**
77+
* The number of employees in the organization
78+
* @type {number}
79+
*/
80+
'employee_count'?: number | null;
81+
/**
6282
* An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes. To clear a custom field value, set it to `null`. For multi-option fields (field type `set`), use `null` to clear the selection — sending an empty array `[]` is not supported and will result in a validation error.
6383
* @type {{ [key: string]: any | undefined; }}
6484
*/

0 commit comments

Comments
 (0)