/** * 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. */ import type { Configuration } from '../configuration'; import type { AxiosInstance } from 'axios'; import { RequestArgs, BaseAPI } from '../base'; import { AddDealProductRequest } from '../models'; import { AddDealProductResponse } from '../models'; import { AddManyDealProductResponse } from '../models'; import { CreateManyDealProductRequest } from '../models'; import { DeleteDealProductResponse } from '../models'; import { DeleteManyDealProductResponse } from '../models'; import { GetDealsProductsResponse } from '../models'; import { UpdateDealProductRequest } from '../models'; /** * DealProductsApi - axios parameter creator * @export */ export declare const DealProductsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {number} id The ID of the deal * @param {AddDealProductRequest} [AddDealProductRequest] * @throws {RequiredError} */ addDealProduct: (id: number, AddDealProductRequest?: AddDealProductRequest) => Promise; /** * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request. * @summary Add multiple products to a deal * @param {number} id The ID of the deal * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest] * @throws {RequiredError} */ addManyDealProducts: (id: number, CreateManyDealProductRequest?: CreateManyDealProductRequest) => Promise; /** * Deletes a product attachment from a deal, using the `product_attachment_id`. * @summary Delete an attached product from a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The product attachment ID * @throws {RequiredError} */ deleteDealProduct: (id: number, product_attachment_id: number) => Promise; /** * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {number} id The ID of the deal * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. * @throws {RequiredError} */ deleteManyDealProducts: (id: number, ids?: string) => Promise; /** * Lists products attached to a deal. * @summary List products attached to a deal * @param {number} id The ID of the deal * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @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 {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ getDealProducts: (id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc') => Promise; /** * Returns data about products attached to deals * @summary Get deal products of several deals * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @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 {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ getDealsProducts: (deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc') => Promise; /** * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal) * @param {UpdateDealProductRequest} [UpdateDealProductRequest] * @throws {RequiredError} */ updateDealProduct: (id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest) => Promise; }; /** * DealProductsApi - functional programming interface * @export */ export declare const DealProductsApiFp: (configuration?: Configuration) => { /** * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {number} id The ID of the deal * @param {AddDealProductRequest} [AddDealProductRequest] * @throws {RequiredError} */ addDealProduct(id: number, AddDealProductRequest?: AddDealProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request. * @summary Add multiple products to a deal * @param {number} id The ID of the deal * @param {CreateManyDealProductRequest} [CreateManyDealProductRequest] * @throws {RequiredError} */ addManyDealProducts(id: number, CreateManyDealProductRequest?: CreateManyDealProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Deletes a product attachment from a deal, using the `product_attachment_id`. * @summary Delete an attached product from a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The product attachment ID * @throws {RequiredError} */ deleteDealProduct(id: number, product_attachment_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {number} id The ID of the deal * @param {string} [ids] Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. * @throws {RequiredError} */ deleteManyDealProducts(id: number, ids?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Lists products attached to a deal. * @summary List products attached to a deal * @param {number} id The ID of the deal * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @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 {'id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ getDealProducts(id: number, cursor?: string, limit?: number, sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns data about products attached to deals * @summary Get deal products of several deals * @param {Array} deal_ids An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided. * @param {string} [cursor] For pagination, the marker (an opaque string value) representing the first item on the next page * @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 {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} [sort_by] The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. * @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`. * @throws {RequiredError} */ getDealsProducts(deal_ids: Array, cursor?: string, limit?: number, sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr', sort_direction?: 'asc' | 'desc'): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {number} id The ID of the deal * @param {number} product_attachment_id The ID of the deal-product (the ID of the product attached to the deal) * @param {UpdateDealProductRequest} [UpdateDealProductRequest] * @throws {RequiredError} */ updateDealProduct(id: number, product_attachment_id: number, UpdateDealProductRequest?: UpdateDealProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; }; /** * DealProductsApi - factory interface * @export */ export declare const DealProductsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {DealProductsApiAddDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} */ addDealProduct(requestParameters: DealProductsApiAddDealProductRequest): Promise; /** * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request. * @summary Add multiple products to a deal * @param {DealProductsApiAddManyDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} */ addManyDealProducts(requestParameters: DealProductsApiAddManyDealProductsRequest): Promise; /** * Deletes a product attachment from a deal, using the `product_attachment_id`. * @summary Delete an attached product from a deal * @param {DealProductsApiDeleteDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} */ deleteDealProduct(requestParameters: DealProductsApiDeleteDealProductRequest): Promise; /** * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {DealProductsApiDeleteManyDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} */ deleteManyDealProducts(requestParameters: DealProductsApiDeleteManyDealProductsRequest): Promise; /** * Lists products attached to a deal. * @summary List products attached to a deal * @param {DealProductsApiGetDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} */ getDealProducts(requestParameters: DealProductsApiGetDealProductsRequest): Promise; /** * Returns data about products attached to deals * @summary Get deal products of several deals * @param {DealProductsApiGetDealsProductsRequest} requestParameters Request parameters. * @throws {RequiredError} */ getDealsProducts(requestParameters: DealProductsApiGetDealsProductsRequest): Promise; /** * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {DealProductsApiUpdateDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} */ updateDealProduct(requestParameters: DealProductsApiUpdateDealProductRequest): Promise; }; /** * Request parameters for addDealProduct operation in DealProductsApi. * @export * @interface DealProductsApiAddDealProductRequest */ export interface DealProductsApiAddDealProductRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiAddDealProduct */ readonly id: number; /** * * @type {AddDealProductRequest} * @memberof DealProductsApiAddDealProduct */ readonly AddDealProductRequest?: AddDealProductRequest; } /** * Request parameters for addManyDealProducts operation in DealProductsApi. * @export * @interface DealProductsApiAddManyDealProductsRequest */ export interface DealProductsApiAddManyDealProductsRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiAddManyDealProducts */ readonly id: number; /** * * @type {CreateManyDealProductRequest} * @memberof DealProductsApiAddManyDealProducts */ readonly CreateManyDealProductRequest?: CreateManyDealProductRequest; } /** * Request parameters for deleteDealProduct operation in DealProductsApi. * @export * @interface DealProductsApiDeleteDealProductRequest */ export interface DealProductsApiDeleteDealProductRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiDeleteDealProduct */ readonly id: number; /** * The product attachment ID * @type {number} * @memberof DealProductsApiDeleteDealProduct */ readonly product_attachment_id: number; } /** * Request parameters for deleteManyDealProducts operation in DealProductsApi. * @export * @interface DealProductsApiDeleteManyDealProductsRequest */ export interface DealProductsApiDeleteManyDealProductsRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiDeleteManyDealProducts */ readonly id: number; /** * Comma-separated list of deal product IDs to delete. If not provided, all deal products will be deleted up to 100 items. Maximum 100 IDs allowed. * @type {string} * @memberof DealProductsApiDeleteManyDealProducts */ readonly ids?: string; } /** * Request parameters for getDealProducts operation in DealProductsApi. * @export * @interface DealProductsApiGetDealProductsRequest */ export interface DealProductsApiGetDealProductsRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiGetDealProducts */ readonly id: number; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof DealProductsApiGetDealProducts */ readonly cursor?: string; /** * 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. * @type {number} * @memberof DealProductsApiGetDealProducts */ readonly limit?: number; /** * The field to sort by. Supported fields: `id`, `add_time`, `update_time`, `order_nr`. * @type {'id' | 'add_time' | 'update_time' | 'order_nr'} * @memberof DealProductsApiGetDealProducts */ readonly sort_by?: 'id' | 'add_time' | 'update_time' | 'order_nr'; /** * The sorting direction. Supported values: `asc`, `desc`. * @type {'asc' | 'desc'} * @memberof DealProductsApiGetDealProducts */ readonly sort_direction?: 'asc' | 'desc'; } /** * Request parameters for getDealsProducts operation in DealProductsApi. * @export * @interface DealProductsApiGetDealsProductsRequest */ export interface DealProductsApiGetDealsProductsRequest { /** * An array of integers with the IDs of the deals for which the attached products will be returned. A maximum of 100 deal IDs can be provided. * @type {Array} * @memberof DealProductsApiGetDealsProducts */ readonly deal_ids: Array; /** * For pagination, the marker (an opaque string value) representing the first item on the next page * @type {string} * @memberof DealProductsApiGetDealsProducts */ readonly cursor?: string; /** * 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. * @type {number} * @memberof DealProductsApiGetDealsProducts */ readonly limit?: number; /** * The field to sort by. Supported fields: `id`, `deal_id`, `add_time`, `update_time`, `order_nr`. * @type {'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'} * @memberof DealProductsApiGetDealsProducts */ readonly sort_by?: 'id' | 'deal_id' | 'add_time' | 'update_time' | 'order_nr'; /** * The sorting direction. Supported values: `asc`, `desc`. * @type {'asc' | 'desc'} * @memberof DealProductsApiGetDealsProducts */ readonly sort_direction?: 'asc' | 'desc'; } /** * Request parameters for updateDealProduct operation in DealProductsApi. * @export * @interface DealProductsApiUpdateDealProductRequest */ export interface DealProductsApiUpdateDealProductRequest { /** * The ID of the deal * @type {number} * @memberof DealProductsApiUpdateDealProduct */ readonly id: number; /** * The ID of the deal-product (the ID of the product attached to the deal) * @type {number} * @memberof DealProductsApiUpdateDealProduct */ readonly product_attachment_id: number; /** * * @type {UpdateDealProductRequest} * @memberof DealProductsApiUpdateDealProduct */ readonly UpdateDealProductRequest?: UpdateDealProductRequest; } /** * DealProductsApi - object-oriented interface * @export * @class DealProductsApi * @extends {BaseAPI} */ export declare class DealProductsApi extends BaseAPI { /** * Adds a product to a deal, creating a new item called a deal-product. * @summary Add a product to a deal * @param {DealProductsApiAddDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ addDealProduct(requestParameters: DealProductsApiAddDealProductRequest): Promise; /** * Adds multiple products to a deal in a single request. Maximum of 100 products allowed per request. * @summary Add multiple products to a deal * @param {DealProductsApiAddManyDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ addManyDealProducts(requestParameters: DealProductsApiAddManyDealProductsRequest): Promise; /** * Deletes a product attachment from a deal, using the `product_attachment_id`. * @summary Delete an attached product from a deal * @param {DealProductsApiDeleteDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ deleteDealProduct(requestParameters: DealProductsApiDeleteDealProductRequest): Promise; /** * Deletes multiple products from a deal. If no product IDs are specified, up to 100 products will be removed from the deal. A maximum of 100 product IDs can be provided per request. * @summary Delete many products from a deal * @param {DealProductsApiDeleteManyDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ deleteManyDealProducts(requestParameters: DealProductsApiDeleteManyDealProductsRequest): Promise; /** * Lists products attached to a deal. * @summary List products attached to a deal * @param {DealProductsApiGetDealProductsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ getDealProducts(requestParameters: DealProductsApiGetDealProductsRequest): Promise; /** * Returns data about products attached to deals * @summary Get deal products of several deals * @param {DealProductsApiGetDealsProductsRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ getDealsProducts(requestParameters: DealProductsApiGetDealsProductsRequest): Promise; /** * Updates the details of the product that has been attached to a deal. * @summary Update the product attached to a deal * @param {DealProductsApiUpdateDealProductRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof DealProductsApi */ updateDealProduct(requestParameters: DealProductsApiUpdateDealProductRequest): Promise; }