Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build 168 - version-minor #606

Merged
merged 2 commits into from
Mar 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ 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 `GET /v2/deals/installments` endpoint to fetch all installments added to a list of deals with cursor pagination
- Added `POST /v2/deals/{id}/installments` endpoint to add an installment to a deal
- Added `PATCH /v2/deals/{id}/installments/{installment_id}` endpoint to edit an installment
- Added `DELETE /v2/deals/{id}/installments/{installment_id}` endpoint to delete an installment
- Added AdditionalData to v2 modals

## [24.1.1] - 2025-02-11
### Fixed
Expand Down
8 changes: 8 additions & 0 deletions docs/v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ BetaApi | deleteActivity | **DELETE** /activities/{id} | Delete an activity
BetaApi | deleteAdditionalDiscount | **DELETE** /deals/{id}/discounts/{discount_id} | Delete a discount from a deal
BetaApi | deleteDeal | **DELETE** /deals/{id} | Delete a deal
BetaApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
BetaApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
BetaApi | deleteOrganization | **DELETE** /organizations/{id} | Delete a organization
BetaApi | deletePerson | **DELETE** /persons/{id} | Delete a person
BetaApi | getActivities | **GET** /activities | Get all activities
Expand All @@ -27,11 +28,13 @@ BetaApi | getDeal | **GET** /deals/{id} | Get details of a deal
BetaApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal
BetaApi | getDeals | **GET** /deals | Get all deals
BetaApi | getDealsProducts | **GET** /deals/products | Get deal products of several deals
BetaApi | getInstallments | **GET** /deals/installments | List installments added to a list of deals
BetaApi | getOrganization | **GET** /organizations/{id} | Get details of a organization
BetaApi | getOrganizations | **GET** /organizations | Get all organizations
BetaApi | getPerson | **GET** /persons/{id} | Get details of a person
BetaApi | getPersons | **GET** /persons | Get all persons
BetaApi | postAdditionalDiscount | **POST** /deals/{id}/discounts | Add a discount to a deal
BetaApi | postInstallment | **POST** /deals/{id}/installments | Add an installment to a deal
BetaApi | searchDeals | **GET** /deals/search | Search deals
BetaApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types
BetaApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
Expand All @@ -42,23 +45,28 @@ BetaApi | updateActivity | **PATCH** /activities/{id} | Update an activity
BetaApi | updateAdditionalDiscount | **PATCH** /deals/{id}/discounts/{discount_id} | Update a discount added to a deal
BetaApi | updateDeal | **PATCH** /deals/{id} | Update a deal
BetaApi | updateDealProduct | **PATCH** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
BetaApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal
BetaApi | updateOrganization | **PATCH** /organizations/{id} | Update a organization
BetaApi | updatePerson | **PATCH** /persons/{id} | Update a person
DealsApi | addDeal | **POST** /deals | Add a new deal
DealsApi | addDealProduct | **POST** /deals/{id}/products | Add a product to a deal
DealsApi | deleteAdditionalDiscount | **DELETE** /deals/{id}/discounts/{discount_id} | Delete a discount from a deal
DealsApi | deleteDeal | **DELETE** /deals/{id} | Delete a deal
DealsApi | deleteDealProduct | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
DealsApi | deleteInstallment | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
DealsApi | getAdditionalDiscounts | **GET** /deals/{id}/discounts | List discounts added to a deal
DealsApi | getDeal | **GET** /deals/{id} | Get details of a deal
DealsApi | getDealProducts | **GET** /deals/{id}/products | List products attached to a deal
DealsApi | getDeals | **GET** /deals | Get all deals
DealsApi | getDealsProducts | **GET** /deals/products | Get deal products of several deals
DealsApi | getInstallments | **GET** /deals/installments | List installments added to a list of deals
DealsApi | postAdditionalDiscount | **POST** /deals/{id}/discounts | Add a discount to a deal
DealsApi | postInstallment | **POST** /deals/{id}/installments | Add an installment to a deal
DealsApi | searchDeals | **GET** /deals/search | Search deals
DealsApi | updateAdditionalDiscount | **PATCH** /deals/{id}/discounts/{discount_id} | Update a discount added to a deal
DealsApi | updateDeal | **PATCH** /deals/{id} | Update a deal
DealsApi | updateDealProduct | **PATCH** /deals/{id}/products/{product_attachment_id} | Update the product attached to a deal
DealsApi | updateInstallment | **PATCH** /deals/{id}/installments/{installment_id} | Update an installment added to a deal
ItemSearchApi | searchItem | **GET** /itemSearch | Perform a search from multiple item types
ItemSearchApi | searchItemByField | **GET** /itemSearch/field | Perform a search using a specific field from an item type
LeadsApi | searchLeads | **GET** /leads/search | Search leads
Expand Down
44 changes: 44 additions & 0 deletions src/versions/v1/models/additional-data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* tslint:disable */
/* eslint-disable */
/**
* Pipedrive API v1
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.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.
*/



/**
* The pagination details of the list
* @export
* @interface AdditionalData
*/
export interface AdditionalData {
/**
* Next pagination start
* @type {number}
*/
'next_start'?: number;
/**
* Pagination start
* @type {number}
*/
'start'?: number;
/**
* Items shown per page
* @type {number}
*/
'limit'?: number;
/**
* If there are more list items in the collection than displayed or not
* @type {boolean}
*/
'more_items_in_collection'?: boolean;
}

6 changes: 3 additions & 3 deletions src/versions/v1/models/get-notes-response-additional-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

// May contain unused imports in some cases
// @ts-ignore
import { GetNotesResponseAdditionalDataPagination } from './get-notes-response-additional-data-pagination';
import { AdditionalData } from './additional-data';

/**
*
Expand All @@ -25,8 +25,8 @@ import { GetNotesResponseAdditionalDataPagination } from './get-notes-response-a
export interface GetNotesResponseAdditionalData {
/**
*
* @type {GetNotesResponseAdditionalDataPagination}
* @type {AdditionalData}
*/
'pagination'?: GetNotesResponseAdditionalDataPagination;
'pagination'?: AdditionalData;
}

2 changes: 1 addition & 1 deletion src/versions/v1/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export * from './add-user-provider-link-request';
export * from './add-user-request';
export * from './add-webhook-request';
export * from './additional-base-organization-item-info';
export * from './additional-data';
export * from './additional-merge-person-info';
export * from './additional-person-info';
export * from './base-deal';
Expand Down Expand Up @@ -411,7 +412,6 @@ export * from './get-note-fields-response-all-of-data-inner-all-of';
export * from './get-note-fields-response-all-of-data-inner-all-of-options-inner';
export * from './get-notes-response';
export * from './get-notes-response-additional-data';
export * from './get-notes-response-additional-data-pagination';
export * from './get-organization-item';
export * from './get-organization-item-all-of';
export * from './get-organization-relationship-response';
Expand Down
62 changes: 57 additions & 5 deletions src/versions/v2/api/activities-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur
* @param {number} [filter_id] If supplied, only activities 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 activities owned by the specified user are returned. If filter_id is provided, this is ignored.
* @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
* @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
* @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
* @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
* @param {string} [updated_since] If set, only activities 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 activities 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`.
Expand All @@ -133,7 +137,7 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur

* @throws {RequiredError}
*/
getActivities: async (filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise<RequestArgs> => {
getActivities: async (filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise<RequestArgs> => {
const localVarPath = `/activities`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
Expand Down Expand Up @@ -165,6 +169,22 @@ export const ActivitiesApiAxiosParamCreator = function (configuration?: Configur
localVarQueryParameter['owner_id'] = owner_id;
}

if (deal_id !== undefined) {
localVarQueryParameter['deal_id'] = deal_id;
}

if (lead_id !== undefined) {
localVarQueryParameter['lead_id'] = lead_id;
}

if (person_id !== undefined) {
localVarQueryParameter['person_id'] = person_id;
}

if (org_id !== undefined) {
localVarQueryParameter['org_id'] = org_id;
}

if (updated_since !== undefined) {
localVarQueryParameter['updated_since'] = updated_since;
}
Expand Down Expand Up @@ -334,6 +354,10 @@ export const ActivitiesApiFp = function(configuration?: Configuration) {
* @param {number} [filter_id] If supplied, only activities 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 activities owned by the specified user are returned. If filter_id is provided, this is ignored.
* @param {number} [deal_id] If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
* @param {string} [lead_id] If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
* @param {number} [person_id] If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
* @param {number} [org_id] If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
* @param {string} [updated_since] If set, only activities with an &#x60;update_time&#x60; 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 activities with an &#x60;update_time&#x60; 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: &#x60;id&#x60;, &#x60;update_time&#x60;, &#x60;add_time&#x60;.
Expand All @@ -344,8 +368,8 @@ export const ActivitiesApiFp = function(configuration?: Configuration) {

* @throws {RequiredError}
*/
async getActivities(filter_id?: number, ids?: string, owner_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivitiesResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor, );
async getActivities(filter_id?: number, ids?: string, owner_id?: number, deal_id?: number, lead_id?: string, person_id?: number, org_id?: number, updated_since?: string, updated_until?: string, sort_by?: 'id' | 'update_time' | 'add_time', sort_direction?: 'asc' | 'desc', include_fields?: 'attendees', limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivitiesResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivities(filter_id, ids, owner_id, deal_id, lead_id, person_id, org_id, updated_since, updated_until, sort_by, sort_direction, include_fields, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
Expand Down Expand Up @@ -410,7 +434,7 @@ export const ActivitiesApiFactory = function (configuration?: Configuration, bas
* @throws {RequiredError}
*/
getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ): Promise<GetActivitiesResponse> {
return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
return localVarFp.getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(axios, basePath));
},
/**
* Returns the details of a specific activity.
Expand Down Expand Up @@ -490,6 +514,34 @@ export interface ActivitiesApiGetActivitiesRequest {
*/
readonly owner_id?: number

/**
* If supplied, only activities linked to the specified deal are returned. If filter_id is provided, this is ignored.
* @type {number}
* @memberof ActivitiesApiGetActivities
*/
readonly deal_id?: number

/**
* If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
* @type {string}
* @memberof ActivitiesApiGetActivities
*/
readonly lead_id?: string

/**
* If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
* @type {number}
* @memberof ActivitiesApiGetActivities
*/
readonly person_id?: number

/**
* If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
* @type {number}
* @memberof ActivitiesApiGetActivities
*/
readonly org_id?: number

/**
* If set, only activities with an &#x60;update_time&#x60; later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
* @type {string}
Expand Down Expand Up @@ -622,7 +674,7 @@ export class ActivitiesApi extends BaseAPI {
* @memberof ActivitiesApi
*/
public getActivities(requestParameters: ActivitiesApiGetActivitiesRequest = {}, ) {
return ActivitiesApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
return ActivitiesApiFp(this.configuration).getActivities(requestParameters.filter_id, requestParameters.ids, requestParameters.owner_id, requestParameters.deal_id, requestParameters.lead_id, requestParameters.person_id, requestParameters.org_id, requestParameters.updated_since, requestParameters.updated_until, requestParameters.sort_by, requestParameters.sort_direction, requestParameters.include_fields, requestParameters.limit, requestParameters.cursor, ).then((request) => request(this.axios, this.basePath));
}

/**
Expand Down
Loading
Loading