UNPKG

@woocommerce/data

Version:
41 lines 1.42 kB
/** * Internal dependencies */ import { TaskListType, TaskType, DeprecatedTaskType } from './types'; /** * A simple class to handle deprecated tasks using the woocommerce_admin_onboarding_task_list filter. */ export declare class DeprecatedTasks { filteredTasks: DeprecatedTaskType[]; tasks: { [key: string]: DeprecatedTaskType[]; }; constructor(); hasDeprecatedTasks(): boolean; getPostData(): { extended_tasks: { title: string; content: string; additional_info: string; time: string; level: number; list_id: string; can_view: boolean; id: string; is_snoozeable: string; is_dismissable: boolean; is_complete: boolean; }[]; } | null; mergeDeprecatedCallbackFunctions(taskLists: TaskListType[]): TaskListType[]; /** * Used to keep backwards compatibility with the extended task list filter on the client. * This can be removed after version WC Admin 2.10 (see deprecated notice in resolvers.js). * * @param {Object} task the returned task object. * @param {Array} keys to keep in the task object. * @return {Object} task with the keys specified. */ static possiblyPruneTaskData(task: TaskType, keys: (keyof TaskType)[]): Partial<TaskType>; } //# sourceMappingURL=deprecated-tasks.d.ts.map