UNPKG

ebay-api

Version:

eBay API for Node and Browser

172 lines (171 loc) 8.68 kB
import { SellFeedParams } from '../../../../types/index.js'; import Restful from '../../index.js'; /** * The <strong>Feed API</strong> lets sellers upload input files, download reports and files including their status, filter reports using URI parameters, and retrieve customer service metrics task details. */ export default class Feed extends Restful { static id: string; get basePath(): string; /** * This method returns the details and status for an array of order tasks based on a specified feed_type or scheduled_id. * * @param dateRange The order tasks creation date range. * @param feedType The feed type associated with the task. * @param limit The maximum number of order tasks that can be returned on each page of the paginated response. * @param lookBackDays The number of previous days in which to search for tasks. Do not use with the date_range parameter. * @param offset The number of order tasks to skip in the result set before returning the first order in the paginated response. * @param scheduleId The schedule ID associated with the order task. */ getOrderTasks({ dateRange, feedType, limit, lookBackDays, offset, scheduleId }?: SellFeedParams): Promise<any>; /** * This method creates an order download task with filter criteria for the order report. * * @param data The CreateOrderTaskRequest */ createOrderTask(data: any): Promise<any>; /** * This method retrieves the task details and status of the specified task. * * @param taskId The ID of the task. This ID is generated when the task was created by the createOrderTask method. */ getOrderTask(taskId: string): Promise<any>; /** * This method searches for multiple tasks of a specific feed type, and includes date filters and pagination. */ getInventoryTasks({ feedType, scheduleId, lookBackDays, dateRange, limit, offset }?: { feedType?: string; scheduleId?: string; lookBackDays?: number; dateRange?: string; limit?: number; offset?: number; }): Promise<any>; /** * This method creates an inventory-related download task for a specified feed type with optional filter criteria. */ createInventoryTask(data: any): Promise<any>; /** * This method retrieves the task details and status of the specified inventory-related task. * @param taskId The ID of the task. */ getInventoryTask(taskId: string): Promise<any>; /** * This method retrieves an array containing the details and status of all schedules based on the specified feed_type. * * @param feedType The feedType associated with the schedule. * @param limit The maximum number of schedules that can be returned on each page of the paginated response. * @param offset The number of schedules to skip in the result set before returning the first schedule in the paginated response. */ getSchedules({ feedType, limit, offset, }?: SellFeedParams): Promise<any>; /** * This method creates a schedule, which is a subscription to the specified schedule template. * * @params data The CreateUserScheduleRequest */ createSchedule(data: any): Promise<any>; /** * This method retrieves schedule details and status of the specified schedule. * * @param scheduleId The ID of the schedule for which to retrieve the details. */ getSchedule(scheduleId: string): Promise<any>; /** * This method updates an existing schedule. * * @param scheduleId The ID of the schedule to update. * @param data The UpdateUserScheduleRequest. */ updateSchedule(scheduleId: string, data?: any): Promise<any>; /** * This method deletes an existing schedule. * * @param scheduleId The schedule_id of the schedule to delete. */ deleteSchedule(scheduleId: string): Promise<any>; /** * This method downloads the latest result file generated by the schedule. * * @param scheduleId The ID of the schedule for which to retrieve the latest result file. */ getLatestResultFile(scheduleId: string): Promise<any>; /** * This method downloads the latest result file generated by the schedule. * * @param scheduleTemplateId The ID of the template to retrieve. */ getScheduleTemplate(scheduleTemplateId: string): Promise<any>; /** * This method retrieves an array containing the details and status of all schedule templates based on the specified feed_type. * * @param feedType The feedType associated with the schedule. * @param limit The maximum number of schedules that can be returned on each page of the paginated response. * @param offset The number of schedules to skip in the result set before returning the first schedule in the paginated response. */ getScheduleTemplates({ feedType, limit, offset, }?: SellFeedParams): Promise<any>; /** * This method returns the details and status for an array of tasks based on a specified feed_type or scheduledId. * * @param dateRange The order tasks creation date range. * @param feedType The feed type associated with the task. * @param limit The maximum number of order tasks that can be returned on each page of the paginated response. * @param lookBackDays The number of previous days in which to search for tasks. Do not use with the date_range parameter. * @param offset The number of order tasks to skip in the result set before returning the first order in the paginated response. * @param scheduleId The schedule ID associated with the task. */ getTasks({ dateRange, feedType, limit, lookBackDays, offset, scheduleId }?: SellFeedParams): Promise<any>; /** * This method creates an upload task or a download task without filter criteria. * * @param data The CreateTaskRequest. */ createTask(data: any): Promise<any>; /** * This method downloads the file previously uploaded using uploadFile. * * @param taskId The task ID associated with the file to be downloaded. */ getInputFile(taskId: string): Promise<any>; /** * This method retrieves the generated file that is associated with the specified task ID. * * @param taskId The task ID associated with the file to be downloaded. */ getResultFile(taskId: string): Promise<any>; /** * This method retrieves the details and status of the specified task. * * @param taskId The ID of the task. */ getTask(taskId: string): Promise<any>; /** * This method associates the specified file with the specified task ID and uploads the input file. * * @param taskId The task_id associated with the file that will be uploaded. * @param data FormDataContentDisposition. */ uploadFile(taskId: string, data?: any): Promise<any>; /** * Use this method to return an array of customer service metric tasks. * * @param dateRange The order tasks creation date range. * @param feedType The feed type associated with the task. * @param limit The maximum number of order tasks that can be returned on each page of the paginated response. * @param lookBackDays The number of previous days in which to search for tasks. Do not use with the date_range parameter. * @param offset The number of order tasks to skip in the result set before returning the first order in the paginated response. * @param scheduleId The schedule ID associated with the task. */ getCustomerServiceMetricTasks({ dateRange, feedType, limit, lookBackDays, offset, }?: SellFeedParams): Promise<any>; /** * Use this method to create a customer service metrics download task with filter criteria for the customer service metrics report. * * @params acceptLanguage Use this header to specify the natural language in which the authenticated user desires the response. * @params data The CreateServiceMetricsTaskRequest */ createCustomerServiceMetricTask(acceptLanguage: string, data: any): Promise<any>; /** * Use this method to retrieve customer service metric task details for the specified task. * * @param taskId Use this path parameter to specify the task ID value for the customer service metric task to retrieve. */ getCustomerServiceMetricTask(taskId: string): Promise<any>; }