PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.17
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.17
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
disco / backend / views / components / Analytics / features / summary / summaryApi.js

summaryApi.js in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.17, at backend/views/components/Analytics/features/summary/summaryApi.js

36 lines 834 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { analyticsApi } from '../api/analyticsApi';
2
3 export const summaryApi = analyticsApi.injectEndpoints({
4 endpoints: (builder) => ({
5 // GET /analytics/summary
6 getSummary: builder.query({
7 query: ({ date_from, date_to } = {}) => ({
8 url: '/summary',
9 params: { date_from, date_to },
10 }),
11 }),
12
13 // GET /analytics/revenue-chart
14 getRevenueChart: builder.query({
15 query: ({ date_from, date_to } = {}) => ({
16 url: '/revenue-chart',
17 params: { date_from, date_to },
18 }),
19 }),
20
21 // GET /analytics/intents-performance
22 getIntentsPerformance: builder.query({
23 query: ({ date_from, date_to } = {}) => ({
24 url: '/intents-performance',
25 params: { date_from, date_to },
26 }),
27 }),
28 }),
29 });
30
31 export const {
32 useGetSummaryQuery,
33 useGetRevenueChartQuery,
34 useGetIntentsPerformanceQuery,
35 } = summaryApi;
36