diff --git a/CHANGELOG.md b/CHANGELOG.md index 2da5ed27..41f6be1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e 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). ## [Unreleased] +### Added +- Added `project_id` parameter to `POST /v1/files` endpoint +- Added `project_id` & `project_name` properties to responses in `/v1/files/*` endpoints ## [33.2.0] - 2026-05-29 ### Added diff --git a/src/versions/v1/api/files-api.ts b/src/versions/v1/api/files-api.ts index ae450d64..2e3ba381 100644 --- a/src/versions/v1/api/files-api.ts +++ b/src/versions/v1/api/files-api.ts @@ -51,10 +51,11 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration * @param {number} [product_id] The ID of the product to associate file(s) with * @param {number} [activity_id] The ID of the activity to associate file(s) with * @param {string} [lead_id] The ID of the lead to associate file(s) with + * @param {number} [project_id] The ID of the project to associate file(s) with * @throws {RequiredError} */ - addFile: async (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, ): Promise => { + 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 => { // verify required parameter 'file' is not null or undefined assertParamExists('addFile', 'file', file) const localVarPath = `/files`; @@ -106,6 +107,10 @@ export const FilesApiAxiosParamCreator = function (configuration?: Configuration localVarFormParams.append('lead_id', lead_id as any); } + if (project_id !== undefined) { + localVarFormParams.append('project_id', project_id as any); + } + localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; @@ -515,11 +520,12 @@ export const FilesApiFp = function(configuration?: Configuration) { * @param {number} [product_id] The ID of the product to associate file(s) with * @param {number} [activity_id] The ID of the activity to associate file(s) with * @param {string} [lead_id] The ID of the lead to associate file(s) with + * @param {number} [project_id] The ID of the project to associate file(s) with * @throws {RequiredError} */ - 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> { - const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, ); + 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> { + const localVarAxiosArgs = await localVarAxiosParamCreator.addFile(file, deal_id, person_id, org_id, product_id, activity_id, lead_id, project_id, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -628,7 +634,7 @@ export const FilesApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ addFile(requestParameters: FilesApiAddFileRequest, ): Promise { - 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)); + 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)); }, /** * 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 adding a remote file. @@ -757,6 +763,13 @@ export interface FilesApiAddFileRequest { * @memberof FilesApiAddFile */ readonly lead_id?: string + + /** + * The ID of the project to associate file(s) with + * @type {number} + * @memberof FilesApiAddFile + */ + readonly project_id?: number } /** @@ -950,7 +963,7 @@ export class FilesApi extends BaseAPI { * @memberof FilesApi */ public addFile(requestParameters: FilesApiAddFileRequest, ) { - 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)); + 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)); } /** diff --git a/src/versions/v1/models/get-files-response-data-inner.ts b/src/versions/v1/models/get-files-response-data-inner.ts index 9e127a60..1ce8b6c4 100644 --- a/src/versions/v1/models/get-files-response-data-inner.ts +++ b/src/versions/v1/models/get-files-response-data-inner.ts @@ -61,6 +61,11 @@ export interface GetFilesResponseDataInner { */ 'lead_id'?: string; /** + * The ID of the project to associate the file with + * @type {number} + */ + 'project_id'?: number; + /** * The date and time when the file was added/created. Format: YYYY-MM-DD HH:MM:SS * @type {string} */ @@ -146,6 +151,11 @@ export interface GetFilesResponseDataInner { */ 'lead_name'?: string; /** + * The name of the project associated with the file + * @type {string} + */ + 'project_name'?: string; + /** * The URL of the download file * @type {string} */