/**
* 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 { AddDealFollowerRequest } from '../models';
import { AddFollowerResponse } from '../models';
import { AddProductImageResponse } from '../models';
import { AddProductRequest } from '../models';
import { AddProductVariationRequest } from '../models';
import { DeleteFollowerResponse } from '../models';
import { DeleteProductImageResponse } from '../models';
import { DeleteProductResponse } from '../models';
import { DeleteProductVariationResponse } from '../models';
import { GetFollowerChangelogsResponse } from '../models';
import { GetFollowersResponse } from '../models';
import { GetProductImageResponse } from '../models';
import { GetProductResponse } from '../models';
import { GetProductSearchResponse } from '../models';
import { GetProductVariationResponse } from '../models';
import { GetProductVariationsResponse } from '../models';
import { GetProductsResponse } from '../models';
import { UpdateProductImageResponse } from '../models';
import { UpdateProductRequest } from '../models';
import { UpdateProductResponse } from '../models';
import { UpdateProductVariationRequest } from '../models';
/**
* ProductsApi - axios parameter creator
* @export
*/
export declare const ProductsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
* @summary Add a product
* @param {AddProductRequest} [AddProductRequest]
* @throws {RequiredError}
*/
addProduct: (AddProductRequest?: AddProductRequest) => Promise;
/**
* Adds a user as a follower to the product.
* @summary Add a follower to a product
* @param {number} id The ID of the product
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
* @throws {RequiredError}
*/
addProductFollower: (id: number, AddDealFollowerRequest?: AddDealFollowerRequest) => Promise;
/**
* Adds a new product variation.
* @summary Add a product variation
* @param {number} id The ID of the product
* @param {AddProductVariationRequest} [AddProductVariationRequest]
* @throws {RequiredError}
*/
addProductVariation: (id: number, AddProductVariationRequest?: AddProductVariationRequest) => Promise;
/**
* Marks a product as deleted. After 30 days, the product will be permanently deleted.
* @summary Delete a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
deleteProduct: (id: number) => Promise;
/**
* Deletes a user follower from the product.
* @summary Delete a follower from a product
* @param {number} id The ID of the product
* @param {number} follower_id The ID of the following user
* @throws {RequiredError}
*/
deleteProductFollower: (id: number, follower_id: number) => Promise;
/**
* Deletes the image of a product.
* @summary Delete an image of a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
deleteProductImage: (id: number) => Promise;
/**
* Deletes a product variation.
* @summary Delete a product variation
* @param {number} id The ID of the product
* @param {number} product_variation_id The ID of the product variation
* @throws {RequiredError}
*/
deleteProductVariation: (id: number, product_variation_id: number) => Promise;
/**
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
* @summary Duplicate a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
duplicateProduct: (id: number) => Promise;
/**
* Returns data about a specific product.
* @summary Get one product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
getProduct: (id: number) => Promise;
/**
* Lists users who are following the product.
* @summary List followers of a product
* @param {number} id The ID of the product
* @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}
*/
getProductFollowers: (id: number, limit?: number, cursor?: string) => Promise;
/**
* Lists changelogs about users have followed the product.
* @summary List followers changelog of a product
* @param {number} id The ID of the product
* @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}
*/
getProductFollowersChangelog: (id: number, limit?: number, cursor?: string) => Promise;
/**
* Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
* @summary Get image of a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
getProductImage: (id: number) => Promise;
/**
* Returns data about all product variations.
* @summary Get all product variations
* @param {number} id The ID of the product
* @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.
* @throws {RequiredError}
*/
getProductVariations: (id: number, cursor?: string, limit?: number) => Promise;
/**
* Returns data about all products.
* @summary Get all products
* @param {number} [owner_id] If supplied, only products owned by the given user will be returned
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
* @param {number} [filter_id] The ID of the filter to use
* @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' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `name`, `add_time`, `update_time`.
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
* @param {string} [updated_since] If set, only products with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
* @param {string} [custom_fields] Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.<br/>A maximum of 15 keys is allowed.
* @throws {RequiredError}
*/
getProducts: (owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, custom_fields?: string) => Promise;
/**
* Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
* @summary Search products
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @param {'code' | 'custom_fields' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default
* @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}
*/
searchProducts: (term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', limit?: number, cursor?: string) => Promise;
/**
* Updates product data.
* @summary Update a product
* @param {number} id The ID of the product
* @param {UpdateProductRequest} [UpdateProductRequest]
* @throws {RequiredError}
*/
updateProduct: (id: number, UpdateProductRequest?: UpdateProductRequest) => Promise;
/**
* Updates the image of a product.
* @summary Update an image for a product
* @param {number} id The ID of the product
* @param {File} data One image supplied in the multipart/form-data encoding
* @throws {RequiredError}
*/
updateProductImage: (id: number, data: File) => Promise;
/**
* Updates product variation data.
* @summary Update a product variation
* @param {number} id The ID of the product
* @param {number} product_variation_id The ID of the product variation
* @param {UpdateProductVariationRequest} [UpdateProductVariationRequest]
* @throws {RequiredError}
*/
updateProductVariation: (id: number, product_variation_id: number, UpdateProductVariationRequest?: UpdateProductVariationRequest) => Promise;
/**
* Uploads an image for a product.
* @summary Upload an image for a product
* @param {number} id The ID of the product
* @param {File} data One image supplied in the multipart/form-data encoding
* @throws {RequiredError}
*/
uploadProductImage: (id: number, data: File) => Promise;
};
/**
* ProductsApi - functional programming interface
* @export
*/
export declare const ProductsApiFp: (configuration?: Configuration) => {
/**
* Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
* @summary Add a product
* @param {AddProductRequest} [AddProductRequest]
* @throws {RequiredError}
*/
addProduct(AddProductRequest?: AddProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Adds a user as a follower to the product.
* @summary Add a follower to a product
* @param {number} id The ID of the product
* @param {AddDealFollowerRequest} [AddDealFollowerRequest]
* @throws {RequiredError}
*/
addProductFollower(id: number, AddDealFollowerRequest?: AddDealFollowerRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Adds a new product variation.
* @summary Add a product variation
* @param {number} id The ID of the product
* @param {AddProductVariationRequest} [AddProductVariationRequest]
* @throws {RequiredError}
*/
addProductVariation(id: number, AddProductVariationRequest?: AddProductVariationRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Marks a product as deleted. After 30 days, the product will be permanently deleted.
* @summary Delete a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
deleteProduct(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Deletes a user follower from the product.
* @summary Delete a follower from a product
* @param {number} id The ID of the product
* @param {number} follower_id The ID of the following user
* @throws {RequiredError}
*/
deleteProductFollower(id: number, follower_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Deletes the image of a product.
* @summary Delete an image of a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
deleteProductImage(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Deletes a product variation.
* @summary Delete a product variation
* @param {number} id The ID of the product
* @param {number} product_variation_id The ID of the product variation
* @throws {RequiredError}
*/
deleteProductVariation(id: number, product_variation_id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
* @summary Duplicate a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
duplicateProduct(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Returns data about a specific product.
* @summary Get one product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
getProduct(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Lists users who are following the product.
* @summary List followers of a product
* @param {number} id The ID of the product
* @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}
*/
getProductFollowers(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Lists changelogs about users have followed the product.
* @summary List followers changelog of a product
* @param {number} id The ID of the product
* @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}
*/
getProductFollowersChangelog(id: number, limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
* @summary Get image of a product
* @param {number} id The ID of the product
* @throws {RequiredError}
*/
getProductImage(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Returns data about all product variations.
* @summary Get all product variations
* @param {number} id The ID of the product
* @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.
* @throws {RequiredError}
*/
getProductVariations(id: number, cursor?: string, limit?: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Returns data about all products.
* @summary Get all products
* @param {number} [owner_id] If supplied, only products owned by the given user will be returned
* @param {string} [ids] Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
* @param {number} [filter_id] The ID of the filter to use
* @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' | 'name' | 'add_time' | 'update_time'} [sort_by] The field to sort by. Supported fields: `id`, `name`, `add_time`, `update_time`.
* @param {'asc' | 'desc'} [sort_direction] The sorting direction. Supported values: `asc`, `desc`.
* @param {string} [updated_since] If set, only products with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
* @param {string} [custom_fields] Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.<br/>A maximum of 15 keys is allowed.
* @throws {RequiredError}
*/
getProducts(owner_id?: number, ids?: string, filter_id?: number, cursor?: string, limit?: number, sort_by?: 'id' | 'name' | 'add_time' | 'update_time', sort_direction?: 'asc' | 'desc', updated_since?: string, custom_fields?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
* @summary Search products
* @param {string} term The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @param {'code' | 'custom_fields' | 'name'} [fields] A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
* @param {boolean} [exact_match] When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @param {'product.price'} [include_fields] Supports including optional fields in the results which are not provided by default
* @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}
*/
searchProducts(term: string, fields?: 'code' | 'custom_fields' | 'name', exact_match?: boolean, include_fields?: 'product.price', limit?: number, cursor?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Updates product data.
* @summary Update a product
* @param {number} id The ID of the product
* @param {UpdateProductRequest} [UpdateProductRequest]
* @throws {RequiredError}
*/
updateProduct(id: number, UpdateProductRequest?: UpdateProductRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Updates the image of a product.
* @summary Update an image for a product
* @param {number} id The ID of the product
* @param {File} data One image supplied in the multipart/form-data encoding
* @throws {RequiredError}
*/
updateProductImage(id: number, data: File): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Updates product variation data.
* @summary Update a product variation
* @param {number} id The ID of the product
* @param {number} product_variation_id The ID of the product variation
* @param {UpdateProductVariationRequest} [UpdateProductVariationRequest]
* @throws {RequiredError}
*/
updateProductVariation(id: number, product_variation_id: number, UpdateProductVariationRequest?: UpdateProductVariationRequest): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
/**
* Uploads an image for a product.
* @summary Upload an image for a product
* @param {number} id The ID of the product
* @param {File} data One image supplied in the multipart/form-data encoding
* @throws {RequiredError}
*/
uploadProductImage(id: number, data: File): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>;
};
/**
* ProductsApi - factory interface
* @export
*/
export declare const ProductsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
* @summary Add a product
* @param {ProductsApiAddProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
addProduct(requestParameters?: ProductsApiAddProductRequest): Promise;
/**
* Adds a user as a follower to the product.
* @summary Add a follower to a product
* @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest): Promise;
/**
* Adds a new product variation.
* @summary Add a product variation
* @param {ProductsApiAddProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
addProductVariation(requestParameters: ProductsApiAddProductVariationRequest): Promise;
/**
* Marks a product as deleted. After 30 days, the product will be permanently deleted.
* @summary Delete a product
* @param {ProductsApiDeleteProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
deleteProduct(requestParameters: ProductsApiDeleteProductRequest): Promise;
/**
* Deletes a user follower from the product.
* @summary Delete a follower from a product
* @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest): Promise;
/**
* Deletes the image of a product.
* @summary Delete an image of a product
* @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
deleteProductImage(requestParameters: ProductsApiDeleteProductImageRequest): Promise;
/**
* Deletes a product variation.
* @summary Delete a product variation
* @param {ProductsApiDeleteProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise;
/**
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
* @summary Duplicate a product
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise;
/**
* Returns data about a specific product.
* @summary Get one product
* @param {ProductsApiGetProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProduct(requestParameters: ProductsApiGetProductRequest): Promise;
/**
* Lists users who are following the product.
* @summary List followers of a product
* @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest): Promise;
/**
* Lists changelogs about users have followed the product.
* @summary List followers changelog of a product
* @param {ProductsApiGetProductFollowersChangelogRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProductFollowersChangelog(requestParameters: ProductsApiGetProductFollowersChangelogRequest): Promise;
/**
* Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
* @summary Get image of a product
* @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProductImage(requestParameters: ProductsApiGetProductImageRequest): Promise;
/**
* Returns data about all product variations.
* @summary Get all product variations
* @param {ProductsApiGetProductVariationsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProductVariations(requestParameters: ProductsApiGetProductVariationsRequest): Promise;
/**
* Returns data about all products.
* @summary Get all products
* @param {ProductsApiGetProductsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
getProducts(requestParameters?: ProductsApiGetProductsRequest): Promise;
/**
* Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
* @summary Search products
* @param {ProductsApiSearchProductsRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
searchProducts(requestParameters: ProductsApiSearchProductsRequest): Promise;
/**
* Updates product data.
* @summary Update a product
* @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
updateProduct(requestParameters: ProductsApiUpdateProductRequest): Promise;
/**
* Updates the image of a product.
* @summary Update an image for a product
* @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
updateProductImage(requestParameters: ProductsApiUpdateProductImageRequest): Promise;
/**
* Updates product variation data.
* @summary Update a product variation
* @param {ProductsApiUpdateProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
updateProductVariation(requestParameters: ProductsApiUpdateProductVariationRequest): Promise;
/**
* Uploads an image for a product.
* @summary Upload an image for a product
* @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
*/
uploadProductImage(requestParameters: ProductsApiUploadProductImageRequest): Promise;
};
/**
* Request parameters for addProduct operation in ProductsApi.
* @export
* @interface ProductsApiAddProductRequest
*/
export interface ProductsApiAddProductRequest {
/**
*
* @type {AddProductRequest}
* @memberof ProductsApiAddProduct
*/
readonly AddProductRequest?: AddProductRequest;
}
/**
* Request parameters for addProductFollower operation in ProductsApi.
* @export
* @interface ProductsApiAddProductFollowerRequest
*/
export interface ProductsApiAddProductFollowerRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiAddProductFollower
*/
readonly id: number;
/**
*
* @type {AddDealFollowerRequest}
* @memberof ProductsApiAddProductFollower
*/
readonly AddDealFollowerRequest?: AddDealFollowerRequest;
}
/**
* Request parameters for addProductVariation operation in ProductsApi.
* @export
* @interface ProductsApiAddProductVariationRequest
*/
export interface ProductsApiAddProductVariationRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiAddProductVariation
*/
readonly id: number;
/**
*
* @type {AddProductVariationRequest}
* @memberof ProductsApiAddProductVariation
*/
readonly AddProductVariationRequest?: AddProductVariationRequest;
}
/**
* Request parameters for deleteProduct operation in ProductsApi.
* @export
* @interface ProductsApiDeleteProductRequest
*/
export interface ProductsApiDeleteProductRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiDeleteProduct
*/
readonly id: number;
}
/**
* Request parameters for deleteProductFollower operation in ProductsApi.
* @export
* @interface ProductsApiDeleteProductFollowerRequest
*/
export interface ProductsApiDeleteProductFollowerRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiDeleteProductFollower
*/
readonly id: number;
/**
* The ID of the following user
* @type {number}
* @memberof ProductsApiDeleteProductFollower
*/
readonly follower_id: number;
}
/**
* Request parameters for deleteProductImage operation in ProductsApi.
* @export
* @interface ProductsApiDeleteProductImageRequest
*/
export interface ProductsApiDeleteProductImageRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiDeleteProductImage
*/
readonly id: number;
}
/**
* Request parameters for deleteProductVariation operation in ProductsApi.
* @export
* @interface ProductsApiDeleteProductVariationRequest
*/
export interface ProductsApiDeleteProductVariationRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiDeleteProductVariation
*/
readonly id: number;
/**
* The ID of the product variation
* @type {number}
* @memberof ProductsApiDeleteProductVariation
*/
readonly product_variation_id: number;
}
/**
* Request parameters for duplicateProduct operation in ProductsApi.
* @export
* @interface ProductsApiDuplicateProductRequest
*/
export interface ProductsApiDuplicateProductRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiDuplicateProduct
*/
readonly id: number;
}
/**
* Request parameters for getProduct operation in ProductsApi.
* @export
* @interface ProductsApiGetProductRequest
*/
export interface ProductsApiGetProductRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiGetProduct
*/
readonly id: number;
}
/**
* Request parameters for getProductFollowers operation in ProductsApi.
* @export
* @interface ProductsApiGetProductFollowersRequest
*/
export interface ProductsApiGetProductFollowersRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiGetProductFollowers
*/
readonly id: number;
/**
* 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 ProductsApiGetProductFollowers
*/
readonly limit?: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof ProductsApiGetProductFollowers
*/
readonly cursor?: string;
}
/**
* Request parameters for getProductFollowersChangelog operation in ProductsApi.
* @export
* @interface ProductsApiGetProductFollowersChangelogRequest
*/
export interface ProductsApiGetProductFollowersChangelogRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiGetProductFollowersChangelog
*/
readonly id: number;
/**
* 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 ProductsApiGetProductFollowersChangelog
*/
readonly limit?: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof ProductsApiGetProductFollowersChangelog
*/
readonly cursor?: string;
}
/**
* Request parameters for getProductImage operation in ProductsApi.
* @export
* @interface ProductsApiGetProductImageRequest
*/
export interface ProductsApiGetProductImageRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiGetProductImage
*/
readonly id: number;
}
/**
* Request parameters for getProductVariations operation in ProductsApi.
* @export
* @interface ProductsApiGetProductVariationsRequest
*/
export interface ProductsApiGetProductVariationsRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiGetProductVariations
*/
readonly id: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof ProductsApiGetProductVariations
*/
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 ProductsApiGetProductVariations
*/
readonly limit?: number;
}
/**
* Request parameters for getProducts operation in ProductsApi.
* @export
* @interface ProductsApiGetProductsRequest
*/
export interface ProductsApiGetProductsRequest {
/**
* If supplied, only products owned by the given user will be returned
* @type {number}
* @memberof ProductsApiGetProducts
*/
readonly owner_id?: number;
/**
* Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
* @type {string}
* @memberof ProductsApiGetProducts
*/
readonly ids?: string;
/**
* The ID of the filter to use
* @type {number}
* @memberof ProductsApiGetProducts
*/
readonly filter_id?: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof ProductsApiGetProducts
*/
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 ProductsApiGetProducts
*/
readonly limit?: number;
/**
* The field to sort by. Supported fields: `id`, `name`, `add_time`, `update_time`.
* @type {'id' | 'name' | 'add_time' | 'update_time'}
* @memberof ProductsApiGetProducts
*/
readonly sort_by?: 'id' | 'name' | 'add_time' | 'update_time';
/**
* The sorting direction. Supported values: `asc`, `desc`.
* @type {'asc' | 'desc'}
* @memberof ProductsApiGetProducts
*/
readonly sort_direction?: 'asc' | 'desc';
/**
* If set, only products with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
* @type {string}
* @memberof ProductsApiGetProducts
*/
readonly updated_since?: string;
/**
* Comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for a smaller response.<br/>A maximum of 15 keys is allowed.
* @type {string}
* @memberof ProductsApiGetProducts
*/
readonly custom_fields?: string;
}
/**
* Request parameters for searchProducts operation in ProductsApi.
* @export
* @interface ProductsApiSearchProductsRequest
*/
export interface ProductsApiSearchProductsRequest {
/**
* The search term to look for. Minimum 2 characters (or 1 if using `exact_match`). Please note that the search term has to be URL encoded.
* @type {string}
* @memberof ProductsApiSearchProducts
*/
readonly term: string;
/**
* A comma-separated string array. The fields to perform the search from. Defaults to all of them. Only the following custom field types are searchable: `address`, `varchar`, `text`, `varchar_auto`, `double`, `monetary` and `phone`. Read more about searching by custom fields <a href=\"https://support.pipedrive.com/en/article/search-finding-what-you-need#searching-by-custom-fields\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.
* @type {'code' | 'custom_fields' | 'name'}
* @memberof ProductsApiSearchProducts
*/
readonly fields?: 'code' | 'custom_fields' | 'name';
/**
* When enabled, only full exact matches against the given term are returned. It is <b>not</b> case sensitive.
* @type {boolean}
* @memberof ProductsApiSearchProducts
*/
readonly exact_match?: boolean;
/**
* Supports including optional fields in the results which are not provided by default
* @type {'product.price'}
* @memberof ProductsApiSearchProducts
*/
readonly include_fields?: 'product.price';
/**
* 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 ProductsApiSearchProducts
*/
readonly limit?: number;
/**
* For pagination, the marker (an opaque string value) representing the first item on the next page
* @type {string}
* @memberof ProductsApiSearchProducts
*/
readonly cursor?: string;
}
/**
* Request parameters for updateProduct operation in ProductsApi.
* @export
* @interface ProductsApiUpdateProductRequest
*/
export interface ProductsApiUpdateProductRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiUpdateProduct
*/
readonly id: number;
/**
*
* @type {UpdateProductRequest}
* @memberof ProductsApiUpdateProduct
*/
readonly UpdateProductRequest?: UpdateProductRequest;
}
/**
* Request parameters for updateProductImage operation in ProductsApi.
* @export
* @interface ProductsApiUpdateProductImageRequest
*/
export interface ProductsApiUpdateProductImageRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiUpdateProductImage
*/
readonly id: number;
/**
* One image supplied in the multipart/form-data encoding
* @type {File}
* @memberof ProductsApiUpdateProductImage
*/
readonly data: File;
}
/**
* Request parameters for updateProductVariation operation in ProductsApi.
* @export
* @interface ProductsApiUpdateProductVariationRequest
*/
export interface ProductsApiUpdateProductVariationRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiUpdateProductVariation
*/
readonly id: number;
/**
* The ID of the product variation
* @type {number}
* @memberof ProductsApiUpdateProductVariation
*/
readonly product_variation_id: number;
/**
*
* @type {UpdateProductVariationRequest}
* @memberof ProductsApiUpdateProductVariation
*/
readonly UpdateProductVariationRequest?: UpdateProductVariationRequest;
}
/**
* Request parameters for uploadProductImage operation in ProductsApi.
* @export
* @interface ProductsApiUploadProductImageRequest
*/
export interface ProductsApiUploadProductImageRequest {
/**
* The ID of the product
* @type {number}
* @memberof ProductsApiUploadProductImage
*/
readonly id: number;
/**
* One image supplied in the multipart/form-data encoding
* @type {File}
* @memberof ProductsApiUploadProductImage
*/
readonly data: File;
}
/**
* ProductsApi - object-oriented interface
* @export
* @class ProductsApi
* @extends {BaseAPI}
*/
export declare class ProductsApi extends BaseAPI {
/**
* Adds a new product to the Products inventory. For more information, see the tutorial for adding a product.
* @summary Add a product
* @param {ProductsApiAddProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
addProduct(requestParameters?: ProductsApiAddProductRequest): Promise;
/**
* Adds a user as a follower to the product.
* @summary Add a follower to a product
* @param {ProductsApiAddProductFollowerRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
addProductFollower(requestParameters: ProductsApiAddProductFollowerRequest): Promise;
/**
* Adds a new product variation.
* @summary Add a product variation
* @param {ProductsApiAddProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
addProductVariation(requestParameters: ProductsApiAddProductVariationRequest): Promise;
/**
* Marks a product as deleted. After 30 days, the product will be permanently deleted.
* @summary Delete a product
* @param {ProductsApiDeleteProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
deleteProduct(requestParameters: ProductsApiDeleteProductRequest): Promise;
/**
* Deletes a user follower from the product.
* @summary Delete a follower from a product
* @param {ProductsApiDeleteProductFollowerRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
deleteProductFollower(requestParameters: ProductsApiDeleteProductFollowerRequest): Promise;
/**
* Deletes the image of a product.
* @summary Delete an image of a product
* @param {ProductsApiDeleteProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
deleteProductImage(requestParameters: ProductsApiDeleteProductImageRequest): Promise;
/**
* Deletes a product variation.
* @summary Delete a product variation
* @param {ProductsApiDeleteProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
deleteProductVariation(requestParameters: ProductsApiDeleteProductVariationRequest): Promise;
/**
* Creates a duplicate of an existing product including all variations, prices, and custom fields.
* @summary Duplicate a product
* @param {ProductsApiDuplicateProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
duplicateProduct(requestParameters: ProductsApiDuplicateProductRequest): Promise;
/**
* Returns data about a specific product.
* @summary Get one product
* @param {ProductsApiGetProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProduct(requestParameters: ProductsApiGetProductRequest): Promise;
/**
* Lists users who are following the product.
* @summary List followers of a product
* @param {ProductsApiGetProductFollowersRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProductFollowers(requestParameters: ProductsApiGetProductFollowersRequest): Promise;
/**
* Lists changelogs about users have followed the product.
* @summary List followers changelog of a product
* @param {ProductsApiGetProductFollowersChangelogRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProductFollowersChangelog(requestParameters: ProductsApiGetProductFollowersChangelogRequest): Promise;
/**
* Retrieves the image of a product. The public URL has a limited lifetime of 7 days.
* @summary Get image of a product
* @param {ProductsApiGetProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProductImage(requestParameters: ProductsApiGetProductImageRequest): Promise;
/**
* Returns data about all product variations.
* @summary Get all product variations
* @param {ProductsApiGetProductVariationsRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProductVariations(requestParameters: ProductsApiGetProductVariationsRequest): Promise;
/**
* Returns data about all products.
* @summary Get all products
* @param {ProductsApiGetProductsRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
getProducts(requestParameters?: ProductsApiGetProductsRequest): Promise;
/**
* Searches all products by name, code and/or custom fields. This endpoint is a wrapper of /v1/itemSearch with a narrower OAuth scope.
* @summary Search products
* @param {ProductsApiSearchProductsRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
searchProducts(requestParameters: ProductsApiSearchProductsRequest): Promise;
/**
* Updates product data.
* @summary Update a product
* @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
updateProduct(requestParameters: ProductsApiUpdateProductRequest): Promise;
/**
* Updates the image of a product.
* @summary Update an image for a product
* @param {ProductsApiUpdateProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
updateProductImage(requestParameters: ProductsApiUpdateProductImageRequest): Promise;
/**
* Updates product variation data.
* @summary Update a product variation
* @param {ProductsApiUpdateProductVariationRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
updateProductVariation(requestParameters: ProductsApiUpdateProductVariationRequest): Promise;
/**
* Uploads an image for a product.
* @summary Upload an image for a product
* @param {ProductsApiUploadProductImageRequest} requestParameters Request parameters.
* @throws {RequiredError}
* @memberof ProductsApi
*/
uploadProductImage(requestParameters: ProductsApiUploadProductImageRequest): Promise;
}