2018-11-29 15:57:49 +00:00
|
|
|
/** @format */
|
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2019-01-22 16:29:46 +00:00
|
|
|
import { MINUTE } from '@fresh-data/framework';
|
2018-11-29 15:57:49 +00:00
|
|
|
|
2019-01-18 02:52:58 +00:00
|
|
|
export const NAMESPACE = '/wc/v4';
|
2018-11-29 15:57:49 +00:00
|
|
|
|
2019-02-06 06:41:53 +00:00
|
|
|
// @todo Remove once swagger endpoints are phased out.
|
2019-01-30 07:22:10 +00:00
|
|
|
export const SWAGGERNAMESPACE = 'https://virtserver.swaggerhub.com/peterfabian/wc-v3-api/1.0.0/';
|
|
|
|
|
2018-11-29 15:57:49 +00:00
|
|
|
export const DEFAULT_REQUIREMENT = {
|
2019-01-22 16:29:46 +00:00
|
|
|
timeout: 1 * MINUTE,
|
2018-11-29 15:57:49 +00:00
|
|
|
freshness: 5 * MINUTE,
|
|
|
|
};
|
|
|
|
|
|
|
|
// WordPress & WooCommerce both set a hard limit of 100 for the per_page parameter
|
|
|
|
export const MAX_PER_PAGE = 100;
|
|
|
|
|
|
|
|
export const QUERY_DEFAULTS = {
|
|
|
|
pageSize: 25,
|
|
|
|
period: 'month',
|
|
|
|
compare: 'previous_year',
|
|
|
|
};
|