Skip to content

Commit e16aa1f

Browse files
author
pipedrive-bot
committed
Build 329 - version-minor
1 parent c24f334 commit e16aa1f

6 files changed

Lines changed: 101 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ 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 `project_id` parameter to `POST /v1/files` endpoint
12+
- Added `project_id` & `project_name` properties to responses in `/v1/files/*` endpoints
1013

1114
## [33.0.1] - 2026-05-13
1215

src/versions/v1/api/files-api.ts

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
5151
* @param {number} [product_id] The ID of the product to associate file(s) with
5252
* @param {number} [activity_id] The ID of the activity to associate file(s) with
5353
* @param {string} [lead_id] The ID of the lead to associate file(s) with
54+
* @param {number} [project_id] The ID of the project to associate file(s) with
5455
5556
* @throws {RequiredError}
5657
*/
57-
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<RequestArgs> => {
58+
addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<RequestArgs> => {
5859
// verify required parameter 'file' is not null or undefined
5960
assertParamExists('addFile', 'file', file)
6061
const localVarPath = `/files`;
@@ -106,6 +107,10 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration
106107
localVarFormParams.append('lead_id', lead_id as any);
107108
}
108109

110+
if (project_id !== undefined) {
111+
localVarFormParams.append('project_id', project_id as any);
112+
}
113+
109114

110115
localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
111116

@@ -515,11 +520,12 @@ export const FilesApiFp = function(configuration?: Configuration) {
515520
* @param {number} [product_id] The ID of the product to associate file(s) with
516521
* @param {number} [activity_id] The ID of the activity to associate file(s) with
517522
* @param {string} [lead_id] The ID of the lead to associate file(s) with
523+
* @param {number} [project_id] The ID of the project to associate file(s) with
518524
519525
* @throws {RequiredError}
520526
*/
521-
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
522-
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, );
527+
async addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AddFileResponse>> {
528+
const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, project_id, );
523529
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
524530
},
525531
/**
@@ -628,7 +634,7 @@ export const FilesApiFactory = function (configuration?: Configuration, basePath
628634
* @throws {RequiredError}
629635
*/
630636
addFile(requestParameters: FilesApiAddFileRequest, ): Promise<AddFileResponse> {
631-
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(axios, basePath));
637+
return localVarFp.addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(axios, basePath));
632638
},
633639
/**
634640
* Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/adding-a-remote-file\" target=\"_blank\" rel=\"noopener noreferrer\">adding a remote file</a>.
@@ -757,6 +763,13 @@ export interface FilesApiAddFileRequest {
757763
* @memberof FilesApiAddFile
758764
*/
759765
readonly lead_id?: string
766+
767+
/**
768+
* The ID of the project to associate file(s) with
769+
* @type {number}
770+
* @memberof FilesApiAddFile
771+
*/
772+
readonly project_id?: number
760773
}
761774

762775
/**
@@ -950,7 +963,7 @@ export class FilesApi extends BaseAPI {
950963
* @memberof FilesApi
951964
*/
952965
public addFile(requestParameters: FilesApiAddFileRequest, ) {
953-
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, ).then((request) => request(this.axios, this.basePath));
966+
return FilesApiFp(this.configuration).addFile(requestParameters.file, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.product_id, requestParameters.activity_id, requestParameters.lead_id, requestParameters.project_id, ).then((request) => request(this.axios, this.basePath));
954967
}
955968

956969
/**

src/versions/v1/models/get-files-response-data-inner.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ export interface GetFilesResponseDataInner {
6161
*/
6262
'lead_id'?: string;
6363
/**
64+
* The ID of the project to associate the file with
65+
* @type {number}
66+
*/
67+
'project_id'?: number;
68+
/**
6469
* The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS
6570
* @type {string}
6671
*/
@@ -146,6 +151,11 @@ export interface GetFilesResponseDataInner {
146151
*/
147152
'lead_name'?: string;
148153
/**
154+
* The name of the project associated with the file
155+
* @type {string}
156+
*/
157+
'project_name'?: string;
158+
/**
149159
* The URL of the download file
150160
* @type {string}
151161
*/

src/versions/v2/api/deal-products-api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ export const DealProductsApiAxiosParamCreator = function (configuration?: Config
319319
await setOAuthToObject(localVarHeaderParameter, "oauth2", ["products:read", "products:full", "deals:read", "deals:full"], configuration)
320320

321321
if (deal_ids) {
322-
localVarQueryParameter['deal_ids'] = deal_ids;
322+
localVarQueryParameter['deal_ids'] = deal_ids.join(COLLECTION_FORMATS.csv);
323323
}
324324

325325
if (cursor !== undefined) {

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

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,12 +369,15 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat
369369
* @param {number} [filter_id] If supplied, only projects matching the specified filter are returned
370370
* @param {string} [status] If supplied, includes only projects with the specified statuses. Possible values are &#x60;open&#x60;, &#x60;completed&#x60;, &#x60;canceled&#x60; and &#x60;deleted&#x60;. By default &#x60;deleted&#x60; projects are not returned.
371371
* @param {number} [phase_id] If supplied, only projects in the specified phase are returned
372+
* @param {number} [deal_id] If supplied, only projects associated with the specified deal are returned
373+
* @param {number} [person_id] If supplied, only projects associated with the specified person are returned
374+
* @param {number} [org_id] If supplied, only projects associated with the specified organization are returned
372375
* @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.
373376
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
374377
375378
* @throws {RequiredError}
376379
*/
377-
getProjects: async (filter_id?: number, status?: string, phase_id?: number, limit?: number, cursor?: string, ): Promise<RequestArgs> => {
380+
getProjects: async (filter_id?: number, status?: string, phase_id?: number, deal_id?: number, person_id?: number, org_id?: number, limit?: number, cursor?: string, ): Promise<RequestArgs> => {
378381
const localVarPath = `/projects`;
379382
// use dummy base URL string because the URL constructor only accepts absolute URLs.
380383
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -406,6 +409,18 @@ export const ProjectsApiAxiosParamCreator = function (configuration?: Configurat
406409
localVarQueryParameter['phase_id'] = phase_id;
407410
}
408411

412+
if (deal_id !== undefined) {
413+
localVarQueryParameter['deal_id'] = deal_id;
414+
}
415+
416+
if (person_id !== undefined) {
417+
localVarQueryParameter['person_id'] = person_id;
418+
}
419+
420+
if (org_id !== undefined) {
421+
localVarQueryParameter['org_id'] = org_id;
422+
}
423+
409424
if (limit !== undefined) {
410425
localVarQueryParameter['limit'] = limit;
411426
}
@@ -644,13 +659,16 @@ export const ProjectsApiFp = function(configuration?: Configuration) {
644659
* @param {number} [filter_id] If supplied, only projects matching the specified filter are returned
645660
* @param {string} [status] If supplied, includes only projects with the specified statuses. Possible values are &#x60;open&#x60;, &#x60;completed&#x60;, &#x60;canceled&#x60; and &#x60;deleted&#x60;. By default &#x60;deleted&#x60; projects are not returned.
646661
* @param {number} [phase_id] If supplied, only projects in the specified phase are returned
662+
* @param {number} [deal_id] If supplied, only projects associated with the specified deal are returned
663+
* @param {number} [person_id] If supplied, only projects associated with the specified person are returned
664+
* @param {number} [org_id] If supplied, only projects associated with the specified organization are returned
647665
* @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.
648666
* @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page
649667
650668
* @throws {RequiredError}
651669
*/
652-
async getProjects(filter_id?: number, status?: string, phase_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProjectsResponse>> {
653-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProjects(filter_id, status, phase_id, limit, cursor, );
670+
async getProjects(filter_id?: number, status?: string, phase_id?: number, deal_id?: number, person_id?: number, org_id?: number, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetProjectsResponse>> {
671+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProjects(filter_id, status, phase_id, deal_id, person_id, org_id, limit, cursor, );
654672
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
655673
},
656674
/**
@@ -770,7 +788,7 @@ export const ProjectsApiFactory = function (configuration?: Configuration, baseP
770788
* @throws {RequiredError}
771789
*/
772790
getProjects(requestParameters: ProjectsApiGetProjectsRequest = {}, ): Promise<GetProjectsResponse> {
773-
return localVarFp.getProjects(requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
791+
return localVarFp.getProjects(requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
774792
},
775793
/**
776794
* Searches all projects by title, description, notes and/or custom fields. This endpoint is a wrapper of <a href=\"https://developers.pipedrive.com/docs/api/v1/ItemSearch#searchItem\">/v1/itemSearch</a> with a narrower OAuth scope. Found projects can be filtered by person ID or organization ID.
@@ -962,6 +980,27 @@ export interface ProjectsApiGetProjectsRequest {
962980
*/
963981
readonly phase_id?: number
964982

983+
/**
984+
* If supplied, only projects associated with the specified deal are returned
985+
* @type {number}
986+
* @memberof ProjectsApiGetProjects
987+
*/
988+
readonly deal_id?: number
989+
990+
/**
991+
* If supplied, only projects associated with the specified person are returned
992+
* @type {number}
993+
* @memberof ProjectsApiGetProjects
994+
*/
995+
readonly person_id?: number
996+
997+
/**
998+
* If supplied, only projects associated with the specified organization are returned
999+
* @type {number}
1000+
* @memberof ProjectsApiGetProjects
1001+
*/
1002+
readonly org_id?: number
1003+
9651004
/**
9661005
* 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.
9671006
* @type {number}
@@ -1154,7 +1193,7 @@ export class ProjectsApi extends BaseAPI {
11541193
* @memberof ProjectsApi
11551194
*/
11561195
public getProjects(requestParameters: ProjectsApiGetProjectsRequest = {}, ) {
1157-
return ProjectsApiFp(this.configuration).getProjects(requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
1196+
return ProjectsApiFp(this.configuration).getProjects(requestParameters.filter_id, requestParameters.status, requestParameters.phase_id, requestParameters.deal_id, requestParameters.person_id, requestParameters.org_id, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
11581197
}
11591198

11601199
/**

src/versions/v2/models/organization-item.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,31 @@ export interface OrganizationItem {
6969
*/
7070
'label_ids'?: Array<number>;
7171
/**
72+
* The website of the organization
73+
* @type {string}
74+
*/
75+
'website'?: string | null;
76+
/**
77+
* The LinkedIn profile URL of the organization
78+
* @type {string}
79+
*/
80+
'linkedin'?: string | null;
81+
/**
82+
* The industry the organization belongs to
83+
* @type {number}
84+
*/
85+
'industry'?: number | null;
86+
/**
87+
* The annual revenue of the organization
88+
* @type {number}
89+
*/
90+
'annual_revenue'?: number | null;
91+
/**
92+
* The number of employees in the organization
93+
* @type {number}
94+
*/
95+
'employee_count'?: number | null;
96+
/**
7297
* 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.
7398
* @type {{ [key: string]: any | undefined; }}
7499
*/

0 commit comments

Comments
 (0)