/** * Bin service. * @module api/BinApi */ export default class BinApi { /** * Constructs a new BinApi. * @alias BinApi * @class * @param {module:ApiClient} [apiClient] Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ constructor(apiClient?: any); apiClient: any; /** * Callback function to receive the result of the deleteBinEntry operation. * @callback deleteBinEntryCallback * @param {Error|null} error Error object if failed, null otherwise. * @param data This operation does not return a value. * @param {Object} [response] Full response object if successful. */ /** * Delete Bin Entry * Deletes permanently a bin entry with a given ID.The following resources can be moved to the bin and permanently deleted: - campaigns - vouchers - products - SKUs To use this endpoint and delete a given resource type, you must have the following permissions: - vouchers.delete to delete a voucher, - campaigns.delete to delete a campaign, - products.delete to delete a product or SKU. * @param {String} binEntryId Provide the unique identifier of the bin entry. * @param {deleteBinEntryCallback} [callback] The callback function, accepting three arguments: error, data, response * @returns {Promise<( | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `` object or with `undefined`. */ deleteBinEntry(binEntryId: string, callback?: (error: Error | null, data: any, response?: any) => any): Promise<(undefined)>; /** * Callback function to receive the result of the listBinEntries operation. * @callback listBinEntriesCallback * @param {Error|null} error Error object if failed, null otherwise. * @param {TrashBinListResponseBody} [data] The data returned by the service call. * @param {Object} [response] Full response object if successful. */ /** * List Bin Entries * Retrieves a list of resources moved to the bin. The following resources can be moved to the bin: - campaigns - vouchers - products - SKUs To use this endpoint, you must have the following permissions: - vouchers.read - campaigns.read - products.read * @param {{ limit?: Number, order?: Exclude, startingAfterId?: String, filters?: ParameterFiltersListBin, }} [opts] Optional parameters * @param {listBinEntriesCallback} [callback] The callback function, accepting three arguments: error, data, response * data is of type: {@link TrashBinListResponseBody} * @returns {Promise<(TrashBinListResponseBody | undefined)>} Depending on whether the `callback` parameter is provided, the promise will resolve with a `TrashBinListResponseBody` object or with `undefined`. */ listBinEntries(opts?: { limit?: number; order?: Exclude; startingAfterId?: string; filters?: ParameterFiltersListBin; }, callback?: (error: Error | null, data?: TrashBinListResponseBody, response?: any) => any): Promise<(TrashBinListResponseBody | undefined)>; } import ParameterOrderListBin from '../model/ParameterOrderListBin'; import ParameterFiltersListBin from '../model/ParameterFiltersListBin'; import TrashBinListResponseBody from '../model/TrashBinListResponseBody';