diff --git a/CHANGELOG.md b/CHANGELOG.md index 709b57d8..8f152b34 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] +### Fixed +- Fixed `nullable: true` handling for `BaseNote.deal` (`BaseNoteDealTitle`, returned by `GET /v1/notes`, `POST /v1/notes`, `GET /v1/notes/{id}`, `PUT /v1/notes/{id}`, and `GET /v1/recents`) and for the `person_id` and `org_id` fields (`DealPersonDataWithId`, `DealOrganizationDataWithId`, returned by `GET /v1/deals/archived` and `GET /v1/products/{id}/deals`) +- Fixed v2 product `prices` item schemas (`POST /api/v2/products`, `PATCH /api/v2/products/{id}`, and other v2 product endpoints) — replaced `ProductPriceBase` by explicit named schemas `ProductPrice` (responses) and `ProductPriceRequest` (add/update product request bodies) and removed `ProductPriceBase`; fields, nullability, and required properties (`price`, `currency`) are unchanged ## [36.0.0] - 2026-10-13 ### Fixed diff --git a/src/versions/v1/models/deal-all-of-org-id.ts b/src/versions/v1/models/deal-all-of-org-id.ts deleted file mode 100644 index 62d93137..00000000 --- a/src/versions/v1/models/deal-all-of-org-id.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* 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. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; - -/** - * @type DealAllOfOrgId - * @export - */ -export type DealAllOfOrgId = DealOrganizationDataWithId; - - diff --git a/src/versions/v1/models/deal-all-of-person-id.ts b/src/versions/v1/models/deal-all-of-person-id.ts deleted file mode 100644 index 46789370..00000000 --- a/src/versions/v1/models/deal-all-of-person-id.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* 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. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { DealPersonDataWithId } from './deal-person-data-with-id'; -// May contain unused imports in some cases -// @ts-ignore -import { DealPersonDataWithIdAllOfEmailInner } from './deal-person-data-with-id-all-of-email-inner'; -// May contain unused imports in some cases -// @ts-ignore -import { DealPersonDataWithIdAllOfPhoneInner } from './deal-person-data-with-id-all-of-phone-inner'; - -/** - * @type DealAllOfPersonId - * @export - */ -export type DealAllOfPersonId = DealPersonDataWithId; - - diff --git a/src/versions/v1/models/deal-all-of.ts b/src/versions/v1/models/deal-all-of.ts index bc77741b..31fd78de 100644 --- a/src/versions/v1/models/deal-all-of.ts +++ b/src/versions/v1/models/deal-all-of.ts @@ -18,10 +18,10 @@ import { DealAllOfCreatorUserId } from './deal-all-of-creator-user-id'; // May contain unused imports in some cases // @ts-ignore -import { DealAllOfOrgId } from './deal-all-of-org-id'; +import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; // May contain unused imports in some cases // @ts-ignore -import { DealAllOfPersonId } from './deal-all-of-person-id'; +import { DealPersonDataWithId } from './deal-person-data-with-id'; // May contain unused imports in some cases // @ts-ignore import { DealUserDataWithId } from './deal-user-data-with-id'; @@ -49,13 +49,13 @@ export interface DealAllOf { 'user_id'?: DealUserDataWithId; /** * - * @type {DealAllOfPersonId} + * @type {DealPersonDataWithId} */ - 'person_id'?: DealAllOfPersonId | null; + 'person_id'?: DealPersonDataWithId | null; /** * - * @type {DealAllOfOrgId} + * @type {DealOrganizationDataWithId} */ - 'org_id'?: DealAllOfOrgId | null; + 'org_id'?: DealOrganizationDataWithId | null; } diff --git a/src/versions/v1/models/deal.ts b/src/versions/v1/models/deal.ts index 1997175d..add9a4f4 100644 --- a/src/versions/v1/models/deal.ts +++ b/src/versions/v1/models/deal.ts @@ -24,10 +24,10 @@ import { DealAllOf } from './deal-all-of'; import { DealAllOfCreatorUserId } from './deal-all-of-creator-user-id'; // May contain unused imports in some cases // @ts-ignore -import { DealAllOfOrgId } from './deal-all-of-org-id'; +import { DealOrganizationDataWithId } from './deal-organization-data-with-id'; // May contain unused imports in some cases // @ts-ignore -import { DealAllOfPersonId } from './deal-all-of-person-id'; +import { DealPersonDataWithId } from './deal-person-data-with-id'; // May contain unused imports in some cases // @ts-ignore import { DealUserDataWithId } from './deal-user-data-with-id'; diff --git a/src/versions/v1/models/index.ts b/src/versions/v1/models/index.ts index 4b03088d..8b75e89e 100644 --- a/src/versions/v1/models/index.ts +++ b/src/versions/v1/models/index.ts @@ -96,8 +96,6 @@ export * from './create-field-request-all-of1'; export * from './deal'; export * from './deal-all-of'; export * from './deal-all-of-creator-user-id'; -export * from './deal-all-of-org-id'; -export * from './deal-all-of-person-id'; export * from './deal-count-and-activity-info'; export * from './deal-count-and-activity-info-all-of'; export * from './deal-count-and-activity-info-all-of1'; @@ -440,7 +438,6 @@ export * from './merge-persons-response'; export * from './merge-persons-response-all-of'; export * from './note'; export * from './note-deal'; -export * from './note-deal-all-of'; export * from './note-organization'; export * from './note-person'; export * from './note-project'; diff --git a/src/versions/v1/models/note-deal-all-of.ts b/src/versions/v1/models/note-deal-all-of.ts deleted file mode 100644 index e7845903..00000000 --- a/src/versions/v1/models/note-deal-all-of.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* 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 deal this note is attached to -* @export -* @interface NoteDealAllOf -*/ -export interface NoteDealAllOf { - /** - * The title of the deal this note is attached to - * @type {string} - */ - 'title'?: string; -} - diff --git a/src/versions/v1/models/note-deal.ts b/src/versions/v1/models/note-deal.ts index f43f60b3..e5cd2ce0 100644 --- a/src/versions/v1/models/note-deal.ts +++ b/src/versions/v1/models/note-deal.ts @@ -13,14 +13,17 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import { NoteDealAllOf } from './note-deal-all-of'; /** - * @type NoteDeal - * @export - */ -export type NoteDeal = NoteDealAllOf; - +* The deal this note is attached to +* @export +* @interface NoteDeal +*/ +export interface NoteDeal { + /** + * The title of the deal this note is attached to + * @type {string} + */ + 'title'?: string; +} diff --git a/src/versions/v2/models/add-product-request.ts b/src/versions/v2/models/add-product-request.ts index f96edd22..038aeaa6 100644 --- a/src/versions/v2/models/add-product-request.ts +++ b/src/versions/v2/models/add-product-request.ts @@ -24,10 +24,10 @@ import { BaseProductAllOf1 } from './base-product-all-of1'; import { GetDealsProductsResponseDataInnerAllOf2 } from './get-deals-products-response-data-inner-all-of2'; // May contain unused imports in some cases // @ts-ignore -import { ProductRequest } from './product-request'; +import { ProductPriceRequest } from './product-price-request'; // May contain unused imports in some cases // @ts-ignore -import { ProductRequestPricesInner } from './product-request-prices-inner'; +import { ProductRequest } from './product-request'; /** * @type AddProductRequest diff --git a/src/versions/v2/models/get-products-response-data-inner.ts b/src/versions/v2/models/get-products-response-data-inner.ts index 27cd2c09..6ff9fd94 100644 --- a/src/versions/v2/models/get-products-response-data-inner.ts +++ b/src/versions/v2/models/get-products-response-data-inner.ts @@ -21,7 +21,7 @@ import { BaseProduct } from './base-product'; import { PricesArray } from './prices-array'; // May contain unused imports in some cases // @ts-ignore -import { PricesArrayPricesInner } from './prices-array-prices-inner'; +import { ProductPrice } from './product-price'; /** * @type GetProductsResponseDataInner diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts index 2e1fa1df..7bfdb5d9 100644 --- a/src/versions/v2/models/index.ts +++ b/src/versions/v2/models/index.ts @@ -261,12 +261,9 @@ export * from './person-item-email'; export * from './person-item-im'; export * from './person-item-phone'; export * from './prices-array'; -export * from './prices-array-prices-inner'; -export * from './prices-array-prices-inner-all-of'; -export * from './product-price-base'; +export * from './product-price'; +export * from './product-price-request'; export * from './product-request'; -export * from './product-request-prices-inner'; -export * from './product-request-prices-inner-all-of'; export * from './project'; export * from './project-template'; export * from './stage-item'; diff --git a/src/versions/v2/models/prices-array-prices-inner.ts b/src/versions/v2/models/prices-array-prices-inner.ts deleted file mode 100644 index 54362e3e..00000000 --- a/src/versions/v2/models/prices-array-prices-inner.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* 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. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { PricesArrayPricesInnerAllOf } from './prices-array-prices-inner-all-of'; -// May contain unused imports in some cases -// @ts-ignore -import { ProductPriceBase } from './product-price-base'; - -/** - * @type PricesArrayPricesInner - * @export - */ -export type PricesArrayPricesInner = PricesArrayPricesInnerAllOf & ProductPriceBase; - - diff --git a/src/versions/v2/models/prices-array.ts b/src/versions/v2/models/prices-array.ts index 1ff09091..7a740b8c 100644 --- a/src/versions/v2/models/prices-array.ts +++ b/src/versions/v2/models/prices-array.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { PricesArrayPricesInner } from './prices-array-prices-inner'; +import { ProductPrice } from './product-price'; /** * @@ -25,8 +25,8 @@ import { PricesArrayPricesInner } from './prices-array-prices-inner'; export interface PricesArray { /** * The prices of the product in different currencies - * @type {Array} + * @type {Array} */ - 'prices'?: Array; + 'prices'?: Array; } diff --git a/src/versions/v2/models/product-price-base.ts b/src/versions/v2/models/product-price-base.ts deleted file mode 100644 index 2976a378..00000000 --- a/src/versions/v2/models/product-price-base.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* 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. - */ - - - -/** -* -* @export -* @interface ProductPriceBase -*/ -export interface ProductPriceBase { - /** - * The price of the product - * @type {number} - */ - 'price'?: number; - /** - * The cost of the product - * @type {number} - */ - 'cost'?: number; -} - diff --git a/src/versions/v2/models/product-request-prices-inner-all-of.ts b/src/versions/v2/models/product-price-request.ts similarity index 74% rename from src/versions/v2/models/product-request-prices-inner-all-of.ts rename to src/versions/v2/models/product-price-request.ts index eae989b4..c8a6e184 100644 --- a/src/versions/v2/models/product-request-prices-inner-all-of.ts +++ b/src/versions/v2/models/product-price-request.ts @@ -17,15 +17,25 @@ /** * * @export -* @interface ProductRequestPricesInnerAllOf +* @interface ProductPriceRequest */ -export interface ProductRequestPricesInnerAllOf { +export interface ProductPriceRequest { + /** + * The price of the product + * @type {number} + */ + 'price': number; /** * The currency of the price * @type {string} */ 'currency': string; /** + * The cost of the product + * @type {number} + */ + 'cost'?: number; + /** * The direct cost of the product * @type {number} */ diff --git a/src/versions/v2/models/prices-array-prices-inner-all-of.ts b/src/versions/v2/models/product-price.ts similarity index 77% rename from src/versions/v2/models/prices-array-prices-inner-all-of.ts rename to src/versions/v2/models/product-price.ts index 419b7165..c2bbbdcb 100644 --- a/src/versions/v2/models/prices-array-prices-inner-all-of.ts +++ b/src/versions/v2/models/product-price.ts @@ -17,9 +17,19 @@ /** * * @export -* @interface PricesArrayPricesInnerAllOf +* @interface ProductPrice */ -export interface PricesArrayPricesInnerAllOf { +export interface ProductPrice { + /** + * The price of the product + * @type {number} + */ + 'price'?: number; + /** + * The cost of the product + * @type {number} + */ + 'cost'?: number; /** * The ID of the product * @type {number} diff --git a/src/versions/v2/models/product-request-prices-inner.ts b/src/versions/v2/models/product-request-prices-inner.ts deleted file mode 100644 index aaefd5df..00000000 --- a/src/versions/v2/models/product-request-prices-inner.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* 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. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { ProductPriceBase } from './product-price-base'; -// May contain unused imports in some cases -// @ts-ignore -import { ProductRequestPricesInnerAllOf } from './product-request-prices-inner-all-of'; - -/** - * @type ProductRequestPricesInner - * @export - */ -export type ProductRequestPricesInner = ProductPriceBase & ProductRequestPricesInnerAllOf; - - diff --git a/src/versions/v2/models/product-request.ts b/src/versions/v2/models/product-request.ts index 440e007a..dac69461 100644 --- a/src/versions/v2/models/product-request.ts +++ b/src/versions/v2/models/product-request.ts @@ -15,7 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { ProductRequestPricesInner } from './product-request-prices-inner'; +import { ProductPriceRequest } from './product-price-request'; /** * @@ -65,9 +65,9 @@ export interface ProductRequest { 'visible_to'?: ProductRequestVisibleToConst; /** * The prices of the product in different currencies. Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and the user\'s default currency will be assigned. - * @type {Array} + * @type {Array} */ - 'prices'?: Array; + 'prices'?: Array; /** * 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; }} diff --git a/src/versions/v2/models/update-product-request.ts b/src/versions/v2/models/update-product-request.ts index 04910271..cf9d9439 100644 --- a/src/versions/v2/models/update-product-request.ts +++ b/src/versions/v2/models/update-product-request.ts @@ -18,10 +18,10 @@ import { GetDealsProductsResponseDataInnerAllOf2 } from './get-deals-products-response-data-inner-all-of2'; // May contain unused imports in some cases // @ts-ignore -import { ProductRequest } from './product-request'; +import { ProductPriceRequest } from './product-price-request'; // May contain unused imports in some cases // @ts-ignore -import { ProductRequestPricesInner } from './product-request-prices-inner'; +import { ProductRequest } from './product-request'; // May contain unused imports in some cases // @ts-ignore import { UpdateProductRequestAllOf } from './update-product-request-all-of';