woocommerce/plugins/woocommerce-admin/client/wc-api/wc-api-spec.js

30 lines
554 B
JavaScript
Raw Normal View History

/** @format */
/**
* Internal dependencies
*/
import notes from './notes';
import orders from './orders';
2018-12-04 03:01:49 +00:00
import reportStats from './reports/stats';
function createWcApiSpec() {
return {
selectors: {
...notes.selectors,
...orders.selectors,
2018-12-04 03:01:49 +00:00
...reportStats.selectors,
},
operations: {
read( resourceNames ) {
return [
...notes.operations.read( resourceNames ),
...orders.operations.read( resourceNames ),
2018-12-04 03:01:49 +00:00
...reportStats.operations.read( resourceNames ),
];
},
},
};
}
export default createWcApiSpec();