From 7b56e74c5a67ccc54e87377300265919271c4bc5 Mon Sep 17 00:00:00 2001 From: pipedrive-bot Date: Thu, 5 Nov 2026 10:39:58 +0000 Subject: [PATCH] Build 359 - version-minor --- CHANGELOG.md | 2 + src/versions/v1/api/goals-api.ts | 32 ++++++++---- .../v1/models/mail-message-data-from-inner.ts | 4 +- src/versions/v1/models/mail-message-data.ts | 2 +- .../mail-message-item-for-list-all-of.ts | 2 +- .../mail-thread-all-of1-parties-to-inner.ts | 6 +-- src/versions/v1/models/mail-thread-all-of1.ts | 12 ++--- .../models/add-product-variation-request.ts | 9 ++-- .../v2/models/base-product-variation-price.ts | 49 +++++++++++++++++++ ...-product-variations-response-data-inner.ts | 9 ++-- src/versions/v2/models/index.ts | 4 ++ .../models/product-variation-price-all-of.ts | 29 +++++++++++ .../models/product-variation-price-request.ts | 26 ++++++++++ .../v2/models/product-variation-price.ts | 29 +++++++++++ .../update-product-variation-request.ts | 9 ++-- 15 files changed, 193 insertions(+), 31 deletions(-) create mode 100644 src/versions/v2/models/base-product-variation-price.ts create mode 100644 src/versions/v2/models/product-variation-price-all-of.ts create mode 100644 src/versions/v2/models/product-variation-price-request.ts create mode 100644 src/versions/v2/models/product-variation-price.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 001ee38f..23d8e0a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ 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 optional `timezone` parameter to `GET /v1/goals/{id}/results`. Accepts an IANA timezone name (e.g. `America/Sao_Paulo`). Defaults to the timezone of the requesting user. Period boundaries are now evaluated in the specified timezone instead of UTC, making results consistent with the Insights UI. ## [36.1.0] - 2026-10-21 ### Added diff --git a/src/versions/v1/api/goals-api.ts b/src/versions/v1/api/goals-api.ts index e263ab1e..5afa7d93 100644 --- a/src/versions/v1/api/goals-api.ts +++ b/src/versions/v1/api/goals-api.ts @@ -127,10 +127,11 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration * @param {string} id The ID of the goal that the results are looked for * @param {string} period_start The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. * @param {string} period_end The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + * @param {string} [timezone] The IANA timezone to use when evaluating period boundaries (e.g. `America/Sao_Paulo`). The start and end of the period are interpreted in this timezone. If omitted, defaults to the timezone of the user making the request. * @throws {RequiredError} */ - getGoalResult: async (id: string, period_start: string, period_end: string, ): Promise => { + getGoalResult: async (id: string, period_start: string, period_end: string, timezone?: string, ): Promise => { // verify required parameter 'id' is not null or undefined assertParamExists('getGoalResult', 'id', id) // verify required parameter 'period_start' is not null or undefined @@ -169,6 +170,10 @@ export const GoalsApiAxiosParamCreator = function (configuration?: Configuration period_end; } + if (timezone !== undefined) { + localVarQueryParameter['timezone'] = timezone; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -392,11 +397,12 @@ export const GoalsApiFp = function(configuration?: Configuration) { * @param {string} id The ID of the goal that the results are looked for * @param {string} period_start The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. * @param {string} period_end The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + * @param {string} [timezone] The IANA timezone to use when evaluating period boundaries (e.g. `America/Sao_Paulo`). The start and end of the period are interpreted in this timezone. If omitted, defaults to the timezone of the user making the request. * @throws {RequiredError} */ - async getGoalResult(id: string, period_start: string, period_end: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGoalResult(id, period_start, period_end, ); + async getGoalResult(id: string, period_start: string, period_end: string, timezone?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGoalResult(id, period_start, period_end, timezone, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, /** @@ -405,11 +411,12 @@ export const GoalsApiFp = function(configuration?: Configuration) { * @param {string} id The ID of the goal that the results are looked for * @param {string} period_start The start date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or after the goal duration start date. * @param {string} period_end The end date of the period for which to find the goal\'s progress. Format: YYYY-MM-DD. This date must be the same or before the goal duration end date. + * @param {string} [timezone] The IANA timezone to use when evaluating period boundaries (e.g. `America/Sao_Paulo`). The start and end of the period are interpreted in this timezone. If omitted, defaults to the timezone of the user making the request. * @throws {RequiredError} */ - async getGoalResultWithHttpInfo(id: string, period_start: string, period_end: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getGoalResult(id, period_start, period_end, ); + async getGoalResultWithHttpInfo(id: string, period_start: string, period_end: string, timezone?: string, ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getGoalResult(id, period_start, period_end, timezone, ); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration, true); }, /** @@ -526,10 +533,10 @@ export const GoalsApiFactory = function (configuration?: Configuration, basePath * @throws {RequiredError} */ getGoalResult(requestParameters: GoalsApiGetGoalResultRequest, ): Promise { - return localVarFp.getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(axios, basePath)); + return localVarFp.getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, requestParameters.timezone, ).then((request) => request(axios, basePath)); }, getGoalResultWithHttpInfo(requestParameters: GoalsApiGetGoalResultRequest, ): Promise> { - return localVarFp.getGoalResultWithHttpInfo(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(axios, basePath)); + return localVarFp.getGoalResultWithHttpInfo(requestParameters.id, requestParameters.period_start, requestParameters.period_end, requestParameters.timezone, ).then((request) => request(axios, basePath)); }, /** * Returns data about goals based on criteria. For searching, append `{searchField}={searchValue}` to the URL, where `searchField` can be any one of the lowest-level fields in dot-notation (e.g. `type.params.pipeline_id`; `title`). `searchValue` should be the value you are looking for on that field. Additionally, `is_active=` can be provided to search for only active/inactive goals. When providing `period.start`, `period.end` must also be provided and vice versa. @@ -614,6 +621,13 @@ export interface GoalsApiGetGoalResultRequest { * @memberof GoalsApiGetGoalResult */ readonly period_end: string + + /** + * The IANA timezone to use when evaluating period boundaries (e.g. `America/Sao_Paulo`). The start and end of the period are interpreted in this timezone. If omitted, defaults to the timezone of the user making the request. + * @type {string} + * @memberof GoalsApiGetGoalResult + */ + readonly timezone?: string } /** @@ -799,7 +813,7 @@ export class GoalsApi extends BaseAPI { * @memberof GoalsApi */ public getGoalResult(requestParameters: GoalsApiGetGoalResultRequest, ) { - return GoalsApiFp(this.configuration).getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(this.axios, this.basePath)); + return GoalsApiFp(this.configuration).getGoalResult(requestParameters.id, requestParameters.period_start, requestParameters.period_end, requestParameters.timezone, ).then((request) => request(this.axios, this.basePath)); } /** @@ -811,7 +825,7 @@ export class GoalsApi extends BaseAPI { * @memberof GoalsApi */ public getGoalResultWithHttpInfo(requestParameters: GoalsApiGetGoalResultRequest, ) { - return GoalsApiFp(this.configuration).getGoalResultWithHttpInfo(requestParameters.id, requestParameters.period_start, requestParameters.period_end, ).then((request) => request(this.axios, this.basePath)); + return GoalsApiFp(this.configuration).getGoalResultWithHttpInfo(requestParameters.id, requestParameters.period_start, requestParameters.period_end, requestParameters.timezone, ).then((request) => request(this.axios, this.basePath)); } /** diff --git a/src/versions/v1/models/mail-message-data-from-inner.ts b/src/versions/v1/models/mail-message-data-from-inner.ts index d5057e4c..d2e61d14 100644 --- a/src/versions/v1/models/mail-message-data-from-inner.ts +++ b/src/versions/v1/models/mail-message-data-from-inner.ts @@ -39,12 +39,12 @@ export interface MailMessageDataFromInner { * ID of the linked person to the mail message * @type {number} */ - 'linked_person_id'?: number; + 'linked_person_id'?: number | null; /** * Name of the linked person to the mail message * @type {string} */ - 'linked_person_name'?: string; + 'linked_person_name'?: string | null; /** * ID of the mail message participant * @type {number} diff --git a/src/versions/v1/models/mail-message-data.ts b/src/versions/v1/models/mail-message-data.ts index d46681a5..0236fb22 100644 --- a/src/versions/v1/models/mail-message-data.ts +++ b/src/versions/v1/models/mail-message-data.ts @@ -102,7 +102,7 @@ export interface MailMessageData { * If the mail message has a draft status then the value is the mail message object as JSON formatted string, otherwise `null`. * @type {string} */ - 'draft'?: string; + 'draft'?: string | null; /** * * @type {number} diff --git a/src/versions/v1/models/mail-message-item-for-list-all-of.ts b/src/versions/v1/models/mail-message-item-for-list-all-of.ts index 3495bb31..22d5d69b 100644 --- a/src/versions/v1/models/mail-message-item-for-list-all-of.ts +++ b/src/versions/v1/models/mail-message-item-for-list-all-of.ts @@ -49,7 +49,7 @@ export interface MailMessageItemForListAllOf { * The ID of the mail template * @type {number} */ - 'template_id'?: number; + 'template_id'?: number | null; /** * The add date and time of the Mail Message * @type {string} diff --git a/src/versions/v1/models/mail-thread-all-of1-parties-to-inner.ts b/src/versions/v1/models/mail-thread-all-of1-parties-to-inner.ts index a311e712..0adc80fa 100644 --- a/src/versions/v1/models/mail-thread-all-of1-parties-to-inner.ts +++ b/src/versions/v1/models/mail-thread-all-of1-parties-to-inner.ts @@ -49,12 +49,12 @@ export interface MailThreadAllOf1PartiesToInner { * ID of the linked person * @type {number} */ - 'linked_person_id'?: number; + 'linked_person_id'?: number | null; /** - * Email of the linked person + * Name of the linked person * @type {string} */ - 'linked_person_name'?: string; + 'linked_person_name'?: string | null; /** * ID of the mail message party * @type {number} diff --git a/src/versions/v1/models/mail-thread-all-of1.ts b/src/versions/v1/models/mail-thread-all-of1.ts index 1c60e0df..ba7573ec 100644 --- a/src/versions/v1/models/mail-thread-all-of1.ts +++ b/src/versions/v1/models/mail-thread-all-of1.ts @@ -29,10 +29,10 @@ export interface MailThreadAllOf1 { */ 'parties'?: MailThreadAllOf1Parties; /** - * Parties of the drafted mail thread + * Parties of the drafted mail thread. `null` if the mail thread has no drafts. * @type {Array} */ - 'drafts_parties'?: Array; + 'drafts_parties'?: Array | null; /** * Folders in which messages from thread are being stored * @type {Array} @@ -52,7 +52,7 @@ export interface MailThreadAllOf1 { * A snippet from a message sent * @type {string} */ - 'snippet_sent'?: string; + 'snippet_sent'?: string | null; /** * An amount of messages * @type {number} @@ -69,10 +69,10 @@ export interface MailThreadAllOf1 { */ 'has_sent_flag'?: MailThreadAllOf1HasSentFlagConst; /** - * + * Whether the mail thread is archived. `null` if the mail thread has not been explicitly archived or unarchived in Pipedrive. * @type {number} */ - 'archived_flag'?: MailThreadAllOf1ArchivedFlagConst; + 'archived_flag'?: MailThreadAllOf1ArchivedFlagConst | null; /** * * @type {number} @@ -107,7 +107,7 @@ export interface MailThreadAllOf1 { * The last time when the mail thread has had a message received * @type {string} */ - 'last_message_received_timestamp'?: string; + 'last_message_received_timestamp'?: string | null; /** * The time when the mail thread was inserted to database * @type {string} diff --git a/src/versions/v2/models/add-product-variation-request.ts b/src/versions/v2/models/add-product-variation-request.ts index ca55983e..ed7792f0 100644 --- a/src/versions/v2/models/add-product-variation-request.ts +++ b/src/versions/v2/models/add-product-variation-request.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ProductVariationPriceRequest } from './product-variation-price-request'; /** * @@ -26,9 +29,9 @@ export interface AddProductVariationRequest { */ 'name': string; /** - * Array of objects, each containing: currency (string), price (number), cost (number, optional), direct_cost (number, optional), notes (string, optional). When prices is omitted altogether, a default price of 0, a default cost of 0, a default direct_cost of 0 and the user\'s default currency will be assigned. - * @type {Array} + * Array of prices of the product variation. When prices is omitted altogether, a default price of 0, a default cost of 0, a default direct_cost of 0 and the user\'s default currency will be assigned. + * @type {Array} */ - 'prices'?: Array; + 'prices'?: Array; } diff --git a/src/versions/v2/models/base-product-variation-price.ts b/src/versions/v2/models/base-product-variation-price.ts new file mode 100644 index 00000000..42e3c44f --- /dev/null +++ b/src/versions/v2/models/base-product-variation-price.ts @@ -0,0 +1,49 @@ +/* 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 BaseProductVariationPrice +*/ +export interface BaseProductVariationPrice { + /** + * The price of the product variation + * @type {number} + */ + 'price'?: number; + /** + * The cost of the product variation + * @type {number} + */ + 'cost'?: number; + /** + * The currency of the price + * @type {string} + */ + 'currency'?: string; + /** + * The direct cost of the product variation + * @type {number} + */ + 'direct_cost'?: number; + /** + * The notes about the price + * @type {string} + */ + 'notes'?: string; +} + diff --git a/src/versions/v2/models/get-product-variations-response-data-inner.ts b/src/versions/v2/models/get-product-variations-response-data-inner.ts index 0befd0df..d0c454ee 100644 --- a/src/versions/v2/models/get-product-variations-response-data-inner.ts +++ b/src/versions/v2/models/get-product-variations-response-data-inner.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ProductVariationPrice } from './product-variation-price'; /** * @@ -36,9 +39,9 @@ export interface GetProductVariationsResponseDataInner { */ 'product_id'?: number; /** - * Array of objects, each containing: product_variation_id (number), currency (string), price (number), cost (number), direct_cost (number) , notes (string) - * @type {Array} + * Array of prices of the product variation + * @type {Array} */ - 'prices'?: Array; + 'prices'?: Array; } diff --git a/src/versions/v2/models/index.ts b/src/versions/v2/models/index.ts index 7bfdb5d9..bb741b68 100644 --- a/src/versions/v2/models/index.ts +++ b/src/versions/v2/models/index.ts @@ -65,6 +65,7 @@ export * from './add-task-response'; export * from './base-product'; export * from './base-product-all-of'; export * from './base-product-all-of1'; +export * from './base-product-variation-price'; export * from './base-response'; export * from './convert-lead-to-deal-request'; export * from './create-many-deal-product-request'; @@ -264,6 +265,9 @@ export * from './prices-array'; export * from './product-price'; export * from './product-price-request'; export * from './product-request'; +export * from './product-variation-price'; +export * from './product-variation-price-all-of'; +export * from './product-variation-price-request'; export * from './project'; export * from './project-template'; export * from './stage-item'; diff --git a/src/versions/v2/models/product-variation-price-all-of.ts b/src/versions/v2/models/product-variation-price-all-of.ts new file mode 100644 index 00000000..0d96de44 --- /dev/null +++ b/src/versions/v2/models/product-variation-price-all-of.ts @@ -0,0 +1,29 @@ +/* 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 ProductVariationPriceAllOf +*/ +export interface ProductVariationPriceAllOf { + /** + * The ID of the product variation + * @type {number} + */ + 'product_variation_id'?: number; +} + diff --git a/src/versions/v2/models/product-variation-price-request.ts b/src/versions/v2/models/product-variation-price-request.ts new file mode 100644 index 00000000..42ecbb82 --- /dev/null +++ b/src/versions/v2/models/product-variation-price-request.ts @@ -0,0 +1,26 @@ +/* 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 { BaseProductVariationPrice } from './base-product-variation-price'; + +/** + * @type ProductVariationPriceRequest + * @export + */ +export type ProductVariationPriceRequest = BaseProductVariationPrice; + + diff --git a/src/versions/v2/models/product-variation-price.ts b/src/versions/v2/models/product-variation-price.ts new file mode 100644 index 00000000..baf4cf90 --- /dev/null +++ b/src/versions/v2/models/product-variation-price.ts @@ -0,0 +1,29 @@ +/* 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 { BaseProductVariationPrice } from './base-product-variation-price'; +// May contain unused imports in some cases +// @ts-ignore +import { ProductVariationPriceAllOf } from './product-variation-price-all-of'; + +/** + * @type ProductVariationPrice + * @export + */ +export type ProductVariationPrice = BaseProductVariationPrice & ProductVariationPriceAllOf; + + diff --git a/src/versions/v2/models/update-product-variation-request.ts b/src/versions/v2/models/update-product-variation-request.ts index 2d68dc9c..c1d88861 100644 --- a/src/versions/v2/models/update-product-variation-request.ts +++ b/src/versions/v2/models/update-product-variation-request.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { ProductVariationPriceRequest } from './product-variation-price-request'; /** * @@ -26,9 +29,9 @@ export interface UpdateProductVariationRequest { */ 'name'?: string; /** - * Array of objects, each containing: currency (string), price (number), cost (number, optional), direct_cost (number, optional), notes (string, optional). When prices is omitted altogether, a default price of 0, a default cost of 0, a default direct_cost of 0 and the user\'s default currency will be assigned. - * @type {Array} + * Array of prices of the product variation. When prices is omitted altogether, a default price of 0, a default cost of 0, a default direct_cost of 0 and the user\'s default currency will be assigned. + * @type {Array} */ - 'prices'?: Array; + 'prices'?: Array; }