@woocommerce/data
Version:
WooCommerce Admin data store and utilities
27 lines • 1.36 kB
TypeScript
/**
* External dependencies
*/
import { SelectFromMap, DispatchFromMap } from '@automattic/data-stores';
/**
* Internal dependencies
*/
import { STORE_NAME } from './constants';
import * as selectors from './selectors';
import * as actions from './actions';
import { State } from './reducer';
import { WPDataActions, WPDataSelectors } from '../types';
import { ReportItemObjectInfer, ReportItemsEndpoint, ReportQueryParams, ReportStatEndpoint, ReportStatObjectInfer, ReportStatQueryParams } from './types';
import { PromiseifySelectors } from '../types/promiseify-selectors';
export * from './types';
export type { State };
export declare const REPORTS_STORE_NAME: "wc/admin/reports";
export type ReportsSelect = WPDataSelectors & Omit<SelectFromMap<typeof selectors>, 'getReportItems' | 'getReportStats'> & {
getReportItems: <T>(endpoint: ReportItemsEndpoint, query: ReportQueryParams) => ReportItemObjectInfer<T>;
getReportStats: <T>(endpoint: ReportStatEndpoint, query: ReportStatQueryParams) => ReportStatObjectInfer<T>;
};
declare module '@wordpress/data' {
function dispatch(key: typeof STORE_NAME): DispatchFromMap<typeof actions & WPDataActions>;
function select(key: typeof STORE_NAME): ReportsSelect;
function resolveSelect(key: typeof STORE_NAME): PromiseifySelectors<ReportsSelect>;
}
//# sourceMappingURL=index.d.ts.map