Skip to content
Open
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ 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]
### Fixed
- Fixed the v2 Deals schemas to match real API behavior:
- Changed `probability` from `number` to `integer` in `deals` endpoints
- Marked optional fields as nullable in the `POST /api/v2/deals` request body: `owner_id`, `pipeline_id`, `stage_id`, `currency`, `is_archived`, `status`, `probability`, `lost_reason`, `visible_to`, `close_time`, `won_time`, `lost_time`, `expected_close_date`, and `label_ids`

## [37.0.0] - 2026-11-25
### Added
Expand Down
92 changes: 74 additions & 18 deletions src/versions/v2/api/activities-api.ts

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions src/versions/v2/api/activity-fields-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf
* Returns metadata about a specific activity field.
* @summary Get one activity field
* @param {string} field_code The unique code identifying the field
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response

* @throws {RequiredError}
*/
getActivityField: async (field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise<RequestArgs> => {
getActivityField: async (field_code: string, include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, ): Promise<RequestArgs> => {
// verify required parameter 'field_code' is not null or undefined
assertParamExists('getActivityField', 'field_code', field_code)
const localVarPath = `/activityFields/{field_code}`
Expand Down Expand Up @@ -80,13 +80,13 @@ export const ActivityFieldsApiAxiosParamCreator = function (configuration?: Conf
/**
* Returns metadata about all activity fields in the company.
* @summary Get all activity fields
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @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}
*/
getActivityFields: async (include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise<RequestArgs> => {
getActivityFields: async (include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, limit?: number, cursor?: string, ): Promise<RequestArgs> => {
const localVarPath = `/activityFields`;
// 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 @@ -144,49 +144,49 @@ export const ActivityFieldsApiFp = function(configuration?: Configuration) {
* Returns metadata about a specific activity field.
* @summary Get one activity field
* @param {string} field_code The unique code identifying the field
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response

* @throws {RequiredError}
*/
async getActivityField(field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivityField200Response>> {
async getActivityField(field_code: string, include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivityField200Response>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityField(field_code, include_fields, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Same as `getActivityField`, but resolves with the response body together with the HTTP status and headers.
* @summary Get one activity field
* @param {string} field_code The unique code identifying the field
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response

* @throws {RequiredError}
*/
async getActivityFieldWithHttpInfo(field_code: string, include_fields?: Set<'ui_visibility'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<ApiResponse<GetActivityField200Response>>> {
async getActivityFieldWithHttpInfo(field_code: string, include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<ApiResponse<GetActivityField200Response>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityField(field_code, include_fields, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration, true);
},
/**
* Returns metadata about all activity fields in the company.
* @summary Get all activity fields
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @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}
*/
async getActivityFields(include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivityFields200Response>> {
async getActivityFields(include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<GetActivityFields200Response>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityFields(include_fields, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Same as `getActivityFields`, but resolves with the response body together with the HTTP status and headers.
* @summary Get all activity fields
* @param {Set<'ui_visibility'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @param {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>} [include_fields] Optional comma separated string array of additional data namespaces to include in response
* @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}
*/
async getActivityFieldsWithHttpInfo(include_fields?: Set<'ui_visibility'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<ApiResponse<GetActivityFields200Response>>> {
async getActivityFieldsWithHttpInfo(include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>, limit?: number, cursor?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<ApiResponse<GetActivityFields200Response>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.getActivityFields(include_fields, limit, cursor, );
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration, true);
},
Expand Down Expand Up @@ -244,10 +244,10 @@ export interface ActivityFieldsApiGetActivityFieldRequest {

/**
* Optional comma separated string array of additional data namespaces to include in response
* @type {Set<'ui_visibility'>}
* @type {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>}
* @memberof ActivityFieldsApiGetActivityField
*/
readonly include_fields?: Set<'ui_visibility'>
readonly include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>
}

/**
Expand All @@ -258,10 +258,10 @@ export interface ActivityFieldsApiGetActivityFieldRequest {
export interface ActivityFieldsApiGetActivityFieldsRequest {
/**
* Optional comma separated string array of additional data namespaces to include in response
* @type {Set<'ui_visibility'>}
* @type {Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>}
* @memberof ActivityFieldsApiGetActivityFields
*/
readonly include_fields?: Set<'ui_visibility'>
readonly include_fields?: Set<'ui_visibility' | 'required_on_creation' | 'required_on_completion'>

/**
* 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.
Expand Down
5 changes: 5 additions & 0 deletions src/versions/v2/models/activity-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,5 +174,10 @@ export interface ActivityItem {
* @type {string}
*/
'note'?: string;
/**
* 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.
* @type {{ [key: string]: any | undefined; }}
*/
'custom_fields'?: { [key: string]: any | undefined; };
}

5 changes: 5 additions & 0 deletions src/versions/v2/models/add-activity-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,10 @@ export interface AddActivityRequest {
* @type {string}
*/
'note'?: string;
/**
* 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.
* @type {{ [key: string]: any | undefined; }}
*/
'custom_fields'?: { [key: string]: any | undefined; };
}

28 changes: 14 additions & 14 deletions src/versions/v2/models/add-deal-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface AddDealRequest {
* The ID of the user who owns the deal
* @type {number}
*/
'owner_id'?: number;
'owner_id'?: number | null;
/**
* The ID of the person linked to the deal
* @type {number}
Expand All @@ -44,12 +44,12 @@ export interface AddDealRequest {
* The ID of the pipeline associated with the deal
* @type {number}
*/
'pipeline_id'?: number;
'pipeline_id'?: number | null;
/**
* The ID of the deal stage
* @type {number}
*/
'stage_id'?: number;
'stage_id'?: number | null;
/**
* The value of the deal
* @type {number}
Expand All @@ -59,12 +59,12 @@ export interface AddDealRequest {
* The currency associated with the deal
* @type {string}
*/
'currency'?: string;
'currency'?: string | null;
/**
* Whether the deal is archived or not
* @type {boolean}
*/
'is_archived'?: boolean;
'is_archived'?: boolean | null;
/**
* The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and `is_archived` is true, it will be set to the current date and time.
* @type {string}
Expand All @@ -74,47 +74,47 @@ export interface AddDealRequest {
* The status of the deal
* @type {string}
*/
'status'?: string;
'status'?: string | null;
/**
* The success probability percentage of the deal
* @type {number}
*/
'probability'?: number;
'probability'?: number | null;
/**
* The reason for losing the deal. Can only be set if deal status is lost.
* @type {string}
*/
'lost_reason'?: string;
'lost_reason'?: string | null;
/**
* The visibility of the deal
* @type {number}
*/
'visible_to'?: number;
'visible_to'?: number | null;
/**
* The date and time of closing the deal. Can only be set if deal status is won or lost.
* @type {string}
*/
'close_time'?: string;
'close_time'?: string | null;
/**
* The date and time of changing the deal status as won. Can only be set if deal status is won.
* @type {string}
*/
'won_time'?: string;
'won_time'?: string | null;
/**
* The date and time of changing the deal status as lost. Can only be set if deal status is lost.
* @type {string}
*/
'lost_time'?: string;
'lost_time'?: string | null;
/**
* The expected close date of the deal
* @type {string}
*/
'expected_close_date'?: string;
'expected_close_date'?: string | null;
/**
* The IDs of labels assigned to the deal
* @type {Array<number>}
*/
'label_ids'?: Array<number>;
'label_ids'?: Array<number> | null;
/**
* The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company. You can fetch allowed values with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
* @type {number}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/



/**
* Activity types for which the field is required when an activity is marked as done (only included when requested via include_fields parameter).
* @export
* @interface GetActivityFields200ResponseDataInnerRequiredOnCompletion
*/
export interface GetActivityFields200ResponseDataInnerRequiredOnCompletion {
/**
* Whether the field is required for all activity types
* @type {boolean}
*/
'required_in_all'?: boolean;
/**
* IDs of the activity types the field is required for
* @type {Array<number>}
*/
'activity_type_ids'?: Array<number>;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/



/**
* Activity types for which the field is required when an activity is created (only included when requested via include_fields parameter).
* @export
* @interface GetActivityFields200ResponseDataInnerRequiredOnCreation
*/
export interface GetActivityFields200ResponseDataInnerRequiredOnCreation {
/**
* Whether the field is required for all activity types
* @type {boolean}
*/
'required_in_all'?: boolean;
/**
* IDs of the activity types the field is required for
* @type {Array<number>}
*/
'activity_type_ids'?: Array<number>;
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/



/**
* Activity types the field is available for. Stored values are kept when a field becomes unavailable for a type and are still returned when reading the activity.
* @export
* @interface GetActivityFields200ResponseDataInnerUiVisibilityShowInActivityTypes
*/
export interface GetActivityFields200ResponseDataInnerUiVisibilityShowInActivityTypes {
/**
* Whether the field is available for all activity types, including ones created later
* @type {boolean}
*/
'show_in_all'?: boolean;
/**
* IDs of the activity types the field is available for. Only present when `show_in_all` is `false`.
* @type {Array<number>}
*/
'activity_type_ids'?: Array<number>;
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
*/


// May contain unused imports in some cases
// @ts-ignore
import { GetActivityFields200ResponseDataInnerUiVisibilityShowInActivityTypes } from './get-activity-fields200-response-data-inner-ui-visibility-show-in-activity-types';

/**
* UI visibility settings (only included when requested via include_fields parameter)
Expand All @@ -30,5 +33,10 @@ export interface GetActivityFields200ResponseDataInnerUiVisibility {
* @type {boolean}
*/
'details_visible_flag'?: boolean;
/**
*
* @type {GetActivityFields200ResponseDataInnerUiVisibilityShowInActivityTypes}
*/
'show_in_activity_types'?: GetActivityFields200ResponseDataInnerUiVisibilityShowInActivityTypes;
}

Loading
Loading