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