/** * 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 { AddFileResponse } from '../models'; import { AddRemoteFileAndLinkItToItemResponse } from '../models'; import { DeleteFileResponse } from '../models'; import { GetFileResponse } from '../models'; import { GetFilesResponse } from '../models'; import { GetLinkRemoteFileToItemResponse } from '../models'; import { UpdateFileResponse } from '../models'; /** * FilesApi - axios parameter creator * @export */ export declare const FilesApiAxiosParamCreator: (configuration?: Configuration) => { /** * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file. * @summary Add file * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries * @param {number} [deal_id] The ID of the deal to associate file(s) with * @param {number} [person_id] The ID of the person to associate file(s) with * @param {number} [org_id] The ID of the organization to associate file(s) with * @param {number} [product_id] The ID of the product to associate file(s) with * @param {number} [activity_id] The ID of the activity to associate file(s) with * @param {string} [lead_id] The ID of the lead to associate file(s) with * @param {number} [project_id] The ID of the project to associate file(s) with * @throws {RequiredError} */ addFile: (file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number) => Promise; /** * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Create a remote file and link it to an item * @param {string} file_type The file type * @param {string} title The title of the file * @param {string} item_type The item type * @param {number} item_id The ID of the item to associate the file with * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment. * @throws {RequiredError} */ addFileAndLinkIt: (file_type: string, title: string, item_type: string, item_id: number, remote_location: string) => Promise; /** * Marks a file as deleted. After 30 days, the file will be permanently deleted. * @summary Delete a file * @param {number} id The ID of the file * @throws {RequiredError} */ deleteFile: (id: number) => Promise; /** * Initializes a file download. * @summary Download one file * @param {number} id The ID of the file * @throws {RequiredError} */ downloadFile: (id: number) => Promise; /** * Returns data about a specific file. * @summary Get one file * @param {number} id The ID of the file * @throws {RequiredError} */ getFile: (id: number) => Promise; /** * Returns data about all files. * @summary Get all files * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page. Please note that a maximum value of 100 is allowed. * @param {string} [sort] Supported fields: `id`, `update_time` * @throws {RequiredError} */ getFiles: (start?: number, limit?: number, sort?: string) => Promise; /** * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Link a remote file to an item * @param {string} item_type The item type * @param {number} item_id The ID of the item to associate the file with * @param {string} remote_id The remote item ID * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment. * @throws {RequiredError} */ linkFileToItem: (item_type: string, item_id: number, remote_id: string, remote_location: string) => Promise; /** * Updates the properties of a file. * @summary Update file details * @param {number} id The ID of the file * @param {string} [name] The visible name of the file * @param {string} [description] The description of the file * @throws {RequiredError} */ updateFile: (id: number, name?: string, description?: string) => Promise; }; /** * FilesApi - functional programming interface * @export */ export declare const FilesApiFp: (configuration?: Configuration) => { /** * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file. * @summary Add file * @param {File} file A single file, supplied in the multipart/form-data encoding and contained within the given boundaries * @param {number} [deal_id] The ID of the deal to associate file(s) with * @param {number} [person_id] The ID of the person to associate file(s) with * @param {number} [org_id] The ID of the organization to associate file(s) with * @param {number} [product_id] The ID of the product to associate file(s) with * @param {number} [activity_id] The ID of the activity to associate file(s) with * @param {string} [lead_id] The ID of the lead to associate file(s) with * @param {number} [project_id] The ID of the project to associate file(s) with * @throws {RequiredError} */ addFile(file: File, deal_id?: number, person_id?: number, org_id?: number, product_id?: number, activity_id?: number, lead_id?: string, project_id?: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Create a remote file and link it to an item * @param {string} file_type The file type * @param {string} title The title of the file * @param {string} item_type The item type * @param {number} item_id The ID of the item to associate the file with * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment. * @throws {RequiredError} */ addFileAndLinkIt(file_type: string, title: string, item_type: string, item_id: number, remote_location: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Marks a file as deleted. After 30 days, the file will be permanently deleted. * @summary Delete a file * @param {number} id The ID of the file * @throws {RequiredError} */ deleteFile(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Initializes a file download. * @summary Download one file * @param {number} id The ID of the file * @throws {RequiredError} */ downloadFile(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns data about a specific file. * @summary Get one file * @param {number} id The ID of the file * @throws {RequiredError} */ getFile(id: number): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Returns data about all files. * @summary Get all files * @param {number} [start] Pagination start * @param {number} [limit] Items shown per page. Please note that a maximum value of 100 is allowed. * @param {string} [sort] Supported fields: `id`, `update_time` * @throws {RequiredError} */ getFiles(start?: number, limit?: number, sort?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Link a remote file to an item * @param {string} item_type The item type * @param {number} item_id The ID of the item to associate the file with * @param {string} remote_id The remote item ID * @param {string} remote_location The location type to send the file to. Only `googledrive` is supported at the moment. * @throws {RequiredError} */ linkFileToItem(item_type: string, item_id: number, remote_id: string, remote_location: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; /** * Updates the properties of a file. * @summary Update file details * @param {number} id The ID of the file * @param {string} [name] The visible name of the file * @param {string} [description] The description of the file * @throws {RequiredError} */ updateFile(id: number, name?: string, description?: string): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>; }; /** * FilesApi - factory interface * @export */ export declare const FilesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file. * @summary Add file * @param {FilesApiAddFileRequest} requestParameters Request parameters. * @throws {RequiredError} */ addFile(requestParameters: FilesApiAddFileRequest): Promise; /** * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Create a remote file and link it to an item * @param {FilesApiAddFileAndLinkItRequest} requestParameters Request parameters. * @throws {RequiredError} */ addFileAndLinkIt(requestParameters: FilesApiAddFileAndLinkItRequest): Promise; /** * Marks a file as deleted. After 30 days, the file will be permanently deleted. * @summary Delete a file * @param {FilesApiDeleteFileRequest} requestParameters Request parameters. * @throws {RequiredError} */ deleteFile(requestParameters: FilesApiDeleteFileRequest): Promise; /** * Initializes a file download. * @summary Download one file * @param {FilesApiDownloadFileRequest} requestParameters Request parameters. * @throws {RequiredError} */ downloadFile(requestParameters: FilesApiDownloadFileRequest): Promise; /** * Returns data about a specific file. * @summary Get one file * @param {FilesApiGetFileRequest} requestParameters Request parameters. * @throws {RequiredError} */ getFile(requestParameters: FilesApiGetFileRequest): Promise; /** * Returns data about all files. * @summary Get all files * @param {FilesApiGetFilesRequest} requestParameters Request parameters. * @throws {RequiredError} */ getFiles(requestParameters?: FilesApiGetFilesRequest): Promise; /** * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Link a remote file to an item * @param {FilesApiLinkFileToItemRequest} requestParameters Request parameters. * @throws {RequiredError} */ linkFileToItem(requestParameters: FilesApiLinkFileToItemRequest): Promise; /** * Updates the properties of a file. * @summary Update file details * @param {FilesApiUpdateFileRequest} requestParameters Request parameters. * @throws {RequiredError} */ updateFile(requestParameters: FilesApiUpdateFileRequest): Promise; }; /** * Request parameters for addFile operation in FilesApi. * @export * @interface FilesApiAddFileRequest */ export interface FilesApiAddFileRequest { /** * A single file, supplied in the multipart/form-data encoding and contained within the given boundaries * @type {File} * @memberof FilesApiAddFile */ readonly file: File; /** * The ID of the deal to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly deal_id?: number; /** * The ID of the person to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly person_id?: number; /** * The ID of the organization to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly org_id?: number; /** * The ID of the product to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly product_id?: number; /** * The ID of the activity to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly activity_id?: number; /** * The ID of the lead to associate file(s) with * @type {string} * @memberof FilesApiAddFile */ readonly lead_id?: string; /** * The ID of the project to associate file(s) with * @type {number} * @memberof FilesApiAddFile */ readonly project_id?: number; } /** * Request parameters for addFileAndLinkIt operation in FilesApi. * @export * @interface FilesApiAddFileAndLinkItRequest */ export interface FilesApiAddFileAndLinkItRequest { /** * The file type * @type {string} * @memberof FilesApiAddFileAndLinkIt */ readonly file_type: string; /** * The title of the file * @type {string} * @memberof FilesApiAddFileAndLinkIt */ readonly title: string; /** * The item type * @type {string} * @memberof FilesApiAddFileAndLinkIt */ readonly item_type: string; /** * The ID of the item to associate the file with * @type {number} * @memberof FilesApiAddFileAndLinkIt */ readonly item_id: number; /** * The location type to send the file to. Only `googledrive` is supported at the moment. * @type {string} * @memberof FilesApiAddFileAndLinkIt */ readonly remote_location: string; } /** * Request parameters for deleteFile operation in FilesApi. * @export * @interface FilesApiDeleteFileRequest */ export interface FilesApiDeleteFileRequest { /** * The ID of the file * @type {number} * @memberof FilesApiDeleteFile */ readonly id: number; } /** * Request parameters for downloadFile operation in FilesApi. * @export * @interface FilesApiDownloadFileRequest */ export interface FilesApiDownloadFileRequest { /** * The ID of the file * @type {number} * @memberof FilesApiDownloadFile */ readonly id: number; } /** * Request parameters for getFile operation in FilesApi. * @export * @interface FilesApiGetFileRequest */ export interface FilesApiGetFileRequest { /** * The ID of the file * @type {number} * @memberof FilesApiGetFile */ readonly id: number; } /** * Request parameters for getFiles operation in FilesApi. * @export * @interface FilesApiGetFilesRequest */ export interface FilesApiGetFilesRequest { /** * Pagination start * @type {number} * @memberof FilesApiGetFiles */ readonly start?: number; /** * Items shown per page. Please note that a maximum value of 100 is allowed. * @type {number} * @memberof FilesApiGetFiles */ readonly limit?: number; /** * Supported fields: `id`, `update_time` * @type {string} * @memberof FilesApiGetFiles */ readonly sort?: string; } /** * Request parameters for linkFileToItem operation in FilesApi. * @export * @interface FilesApiLinkFileToItemRequest */ export interface FilesApiLinkFileToItemRequest { /** * The item type * @type {string} * @memberof FilesApiLinkFileToItem */ readonly item_type: string; /** * The ID of the item to associate the file with * @type {number} * @memberof FilesApiLinkFileToItem */ readonly item_id: number; /** * The remote item ID * @type {string} * @memberof FilesApiLinkFileToItem */ readonly remote_id: string; /** * The location type to send the file to. Only `googledrive` is supported at the moment. * @type {string} * @memberof FilesApiLinkFileToItem */ readonly remote_location: string; } /** * Request parameters for updateFile operation in FilesApi. * @export * @interface FilesApiUpdateFileRequest */ export interface FilesApiUpdateFileRequest { /** * The ID of the file * @type {number} * @memberof FilesApiUpdateFile */ readonly id: number; /** * The visible name of the file * @type {string} * @memberof FilesApiUpdateFile */ readonly name?: string; /** * The description of the file * @type {string} * @memberof FilesApiUpdateFile */ readonly description?: string; } /** * FilesApi - object-oriented interface * @export * @class FilesApi * @extends {BaseAPI} */ export declare class FilesApi extends BaseAPI { /** * Lets you upload a file and associate it with a deal, person, organization, activity, product or lead. For more information, see the tutorial for adding a file. * @summary Add file * @param {FilesApiAddFileRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ addFile(requestParameters: FilesApiAddFileRequest): Promise; /** * Creates a new empty file in the remote location (`googledrive`) that will be linked to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Create a remote file and link it to an item * @param {FilesApiAddFileAndLinkItRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ addFileAndLinkIt(requestParameters: FilesApiAddFileAndLinkItRequest): Promise; /** * Marks a file as deleted. After 30 days, the file will be permanently deleted. * @summary Delete a file * @param {FilesApiDeleteFileRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ deleteFile(requestParameters: FilesApiDeleteFileRequest): Promise; /** * Initializes a file download. * @summary Download one file * @param {FilesApiDownloadFileRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ downloadFile(requestParameters: FilesApiDownloadFileRequest): Promise; /** * Returns data about a specific file. * @summary Get one file * @param {FilesApiGetFileRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ getFile(requestParameters: FilesApiGetFileRequest): Promise; /** * Returns data about all files. * @summary Get all files * @param {FilesApiGetFilesRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ getFiles(requestParameters?: FilesApiGetFilesRequest): Promise; /** * Links an existing remote file (`googledrive`) to the item you supply. For more information, see the tutorial for adding a remote file. * @summary Link a remote file to an item * @param {FilesApiLinkFileToItemRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ linkFileToItem(requestParameters: FilesApiLinkFileToItemRequest): Promise; /** * Updates the properties of a file. * @summary Update file details * @param {FilesApiUpdateFileRequest} requestParameters Request parameters. * @throws {RequiredError} * @memberof FilesApi */ updateFile(requestParameters: FilesApiUpdateFileRequest): Promise; }