/** * 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. */ import type { Configuration } from '../configuration'; import type { AxiosInstance } from 'axios'; import { RequestArgs, BaseAPI } from '../base'; import { AddGoalRequest } from '../models'; import { BasicGoalRequest } from '../models'; import { DeleteGoalResponse } from '../models'; import { GetGoalResultResponse } from '../models'; import { GetGoalsResponse } from '../models'; import { UpsertGoalResponse } from '../models'; /** * GoalsApi - axios parameter creator * @export */ export declare const GoalsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. * @summary Add a new goal * @param {AddGoalRequest} [AddGoalRequest] * @throws {RequiredError} */ addGoal: (AddGoalRequest?: AddGoalRequest) => Promise; /** * Marks a goal as deleted. * @summary Delete existing goal * @param {string} id The ID of the goal * @throws {RequiredError} */ deleteGoal: (id: string) => Promise; /** * Gets the progress of a goal for the specified period. * @summary Get result of a goal * @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. * @throws {RequiredError} */ getGoalResult: (id: string, period_start: string, period_end: string) => Promise; /** * 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. * @summary Find goals * @param {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} [type_name] The type of the goal. If provided, everyone\'s goals will be returned. * @param {string} [title] The title of the goal * @param {boolean} [is_active] Whether the goal is active or not * @param {number} [assignee_id] The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. * @param {'person' | 'company' | 'team'} [assignee_type] The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. * @param {number} [expected_outcome_target] The numeric value of the outcome. If provided, everyone\'s goals will be returned. * @param {'quantity' | 'sum'} [expected_outcome_tracking_metric] The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. * @param {number} [expected_outcome_currency_id] The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. * @param {Array} [type_params_pipeline_id] An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. * @param {number} [type_params_stage_id] The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. * @param {Array} [type_params_activity_type_id] An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. * @param {string} [period_start] The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. * @param {string} [period_end] The end date of the period for which to find goals. Date in format of YYYY-MM-DD. * @throws {RequiredError} */ getGoals: (type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started', title?: string, is_active?: boolean, assignee_id?: number, assignee_type?: 'person' | 'company' | 'team', expected_outcome_target?: number, expected_outcome_tracking_metric?: 'quantity' | 'sum', expected_outcome_currency_id?: number, type_params_pipeline_id?: Array, type_params_stage_id?: number, type_params_activity_type_id?: Array, period_start?: string, period_end?: string) => Promise; /** * Updates an existing goal. * @summary Update existing goal * @param {string} id The ID of the goal * @param {BasicGoalRequest} [BasicGoalRequest] * @throws {RequiredError} */ updateGoal: (id: string, BasicGoalRequest?: BasicGoalRequest) => Promise; }; /** * GoalsApi - functional programming interface * @export */ export declare const GoalsApiFp: (configuration?: Configuration) => { /** * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. * @summary Add a new goal * @param {AddGoalRequest} [AddGoalRequest] * @throws {RequiredError} */ addGoal(AddGoalRequest?: AddGoalRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Marks a goal as deleted. * @summary Delete existing goal * @param {string} id The ID of the goal * @throws {RequiredError} */ deleteGoal(id: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Gets the progress of a goal for the specified period. * @summary Get result of a goal * @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. * @throws {RequiredError} */ getGoalResult(id: string, period_start: string, period_end: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * 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. * @summary Find goals * @param {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} [type_name] The type of the goal. If provided, everyone\'s goals will be returned. * @param {string} [title] The title of the goal * @param {boolean} [is_active] Whether the goal is active or not * @param {number} [assignee_id] The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. * @param {'person' | 'company' | 'team'} [assignee_type] The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. * @param {number} [expected_outcome_target] The numeric value of the outcome. If provided, everyone\'s goals will be returned. * @param {'quantity' | 'sum'} [expected_outcome_tracking_metric] The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. * @param {number} [expected_outcome_currency_id] The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. * @param {Array} [type_params_pipeline_id] An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. * @param {number} [type_params_stage_id] The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. * @param {Array} [type_params_activity_type_id] An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. * @param {string} [period_start] The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. * @param {string} [period_end] The end date of the period for which to find goals. Date in format of YYYY-MM-DD. * @throws {RequiredError} */ getGoals(type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started', title?: string, is_active?: boolean, assignee_id?: number, assignee_type?: 'person' | 'company' | 'team', expected_outcome_target?: number, expected_outcome_tracking_metric?: 'quantity' | 'sum', expected_outcome_currency_id?: number, type_params_pipeline_id?: Array, type_params_stage_id?: number, type_params_activity_type_id?: Array, period_start?: string, period_end?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Updates an existing goal. * @summary Update existing goal * @param {string} id The ID of the goal * @param {BasicGoalRequest} [BasicGoalRequest] * @throws {RequiredError} */ updateGoal(id: string, BasicGoalRequest?: BasicGoalRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; }; /** * GoalsApi - factory interface * @export */ export declare const GoalsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. * @summary Add a new goal * @param {GoalsApiAddGoalRequest} requestParameters Request parameters. * @throws {RequiredError} */ addGoal(requestParameters?: GoalsApiAddGoalRequest): Promise; /** * Marks a goal as deleted. * @summary Delete existing goal * @param {GoalsApiDeleteGoalRequest} requestParameters Request parameters. * @throws {RequiredError} */ deleteGoal(requestParameters: GoalsApiDeleteGoalRequest): Promise; /** * Gets the progress of a goal for the specified period. * @summary Get result of a goal * @param {GoalsApiGetGoalResultRequest} requestParameters Request parameters. * @throws {RequiredError} */ getGoalResult(requestParameters: GoalsApiGetGoalResultRequest): Promise; /** * 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. * @summary Find goals * @param {GoalsApiGetGoalsRequest} requestParameters Request parameters. * @throws {RequiredError} */ getGoals(requestParameters?: GoalsApiGetGoalsRequest): Promise; /** * Updates an existing goal. * @summary Update existing goal * @param {GoalsApiUpdateGoalRequest} requestParameters Request parameters. * @throws {RequiredError} */ updateGoal(requestParameters: GoalsApiUpdateGoalRequest): Promise; }; /** * Request parameters for addGoal operation in GoalsApi. * @export * @interface GoalsApiAddGoalRequest */ export interface GoalsApiAddGoalRequest { /** * * @type {AddGoalRequest} * @memberof GoalsApiAddGoal */ readonly AddGoalRequest?: AddGoalRequest; } /** * Request parameters for deleteGoal operation in GoalsApi. * @export * @interface GoalsApiDeleteGoalRequest */ export interface GoalsApiDeleteGoalRequest { /** * The ID of the goal * @type {string} * @memberof GoalsApiDeleteGoal */ readonly id: string; } /** * Request parameters for getGoalResult operation in GoalsApi. * @export * @interface GoalsApiGetGoalResultRequest */ export interface GoalsApiGetGoalResultRequest { /** * The ID of the goal that the results are looked for * @type {string} * @memberof GoalsApiGetGoalResult */ readonly id: string; /** * 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. * @type {string} * @memberof GoalsApiGetGoalResult */ readonly period_start: string; /** * 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. * @type {string} * @memberof GoalsApiGetGoalResult */ readonly period_end: string; } /** * Request parameters for getGoals operation in GoalsApi. * @export * @interface GoalsApiGetGoalsRequest */ export interface GoalsApiGetGoalsRequest { /** * The type of the goal. If provided, everyone\'s goals will be returned. * @type {'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'} * @memberof GoalsApiGetGoals */ readonly type_name?: 'deals_won' | 'deals_progressed' | 'activities_completed' | 'activities_added' | 'deals_started'; /** * The title of the goal * @type {string} * @memberof GoalsApiGetGoals */ readonly title?: string; /** * Whether the goal is active or not * @type {boolean} * @memberof GoalsApiGetGoals */ readonly is_active?: boolean; /** * The ID of the user who\'s goal to fetch. When omitted, only your goals will be returned. * @type {number} * @memberof GoalsApiGetGoals */ readonly assignee_id?: number; /** * The type of the goal\'s assignee. If provided, everyone\'s goals will be returned. * @type {'person' | 'company' | 'team'} * @memberof GoalsApiGetGoals */ readonly assignee_type?: 'person' | 'company' | 'team'; /** * The numeric value of the outcome. If provided, everyone\'s goals will be returned. * @type {number} * @memberof GoalsApiGetGoals */ readonly expected_outcome_target?: number; /** * The tracking metric of the expected outcome of the goal. If provided, everyone\'s goals will be returned. * @type {'quantity' | 'sum'} * @memberof GoalsApiGetGoals */ readonly expected_outcome_tracking_metric?: 'quantity' | 'sum'; /** * The numeric ID of the goal\'s currency. Only applicable to goals with `expected_outcome.tracking_metric` with value `sum`. If provided, everyone\'s goals will be returned. * @type {number} * @memberof GoalsApiGetGoals */ readonly expected_outcome_currency_id?: number; /** * An array of pipeline IDs or `null` for all pipelines. If provided, everyone\'s goals will be returned. * @type {Array} * @memberof GoalsApiGetGoals */ readonly type_params_pipeline_id?: Array; /** * The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone\'s goals will be returned. * @type {number} * @memberof GoalsApiGetGoals */ readonly type_params_stage_id?: number; /** * An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or `activities_added` types of goals. If provided, everyone\'s goals will be returned. * @type {Array} * @memberof GoalsApiGetGoals */ readonly type_params_activity_type_id?: Array; /** * The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start` is provided, `period.end` must be provided too. * @type {string} * @memberof GoalsApiGetGoals */ readonly period_start?: string; /** * The end date of the period for which to find goals. Date in format of YYYY-MM-DD. * @type {string} * @memberof GoalsApiGetGoals */ readonly period_end?: string; } /** * Request parameters for updateGoal operation in GoalsApi. * @export * @interface GoalsApiUpdateGoalRequest */ export interface GoalsApiUpdateGoalRequest { /** * The ID of the goal * @type {string} * @memberof GoalsApiUpdateGoal */ readonly id: string; /** * * @type {BasicGoalRequest} * @memberof GoalsApiUpdateGoal */ readonly BasicGoalRequest?: BasicGoalRequest; } /** * GoalsApi - object-oriented interface * @export * @class GoalsApi * @extends {BaseAPI} */ export declare class GoalsApi extends BaseAPI { /** * Adds a new goal. Along with adding a new goal, a report is created to track the progress of your goal. * @summary Add a new goal * @param {GoalsApiAddGoalRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof GoalsApi */ addGoal(requestParameters?: GoalsApiAddGoalRequest): Promise; /** * Marks a goal as deleted. * @summary Delete existing goal * @param {GoalsApiDeleteGoalRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof GoalsApi */ deleteGoal(requestParameters: GoalsApiDeleteGoalRequest): Promise; /** * Gets the progress of a goal for the specified period. * @summary Get result of a goal * @param {GoalsApiGetGoalResultRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof GoalsApi */ getGoalResult(requestParameters: GoalsApiGetGoalResultRequest): Promise; /** * 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. * @summary Find goals * @param {GoalsApiGetGoalsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof GoalsApi */ getGoals(requestParameters?: GoalsApiGetGoalsRequest): Promise; /** * Updates an existing goal. * @summary Update existing goal * @param {GoalsApiUpdateGoalRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof GoalsApi */ updateGoal(requestParameters: GoalsApiUpdateGoalRequest): Promise; }