1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.deprecation = exports.OPERATORS = exports.GENERATED_TIME_TYPES = exports.TYPE_ANY = exports.TYPES = exports.AGENT_ID_ALLOWED_REGEXP = exports.AGENT_ID_MAX_LENGTH = exports.IN_BROWSER = exports.DEFAULT_DECISION_TREE_VERSION = undefined;
|
7 |
|
8 | var _lodash = require('lodash');
|
9 |
|
10 | var _lodash2 = _interopRequireDefault(_lodash);
|
11 |
|
12 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13 |
|
14 | var DEFAULT_DECISION_TREE_VERSION = exports.DEFAULT_DECISION_TREE_VERSION = '1';
|
15 |
|
16 | var IN_BROWSER = exports.IN_BROWSER = typeof window !== 'undefined';
|
17 |
|
18 | var AGENT_ID_MAX_LENGTH = exports.AGENT_ID_MAX_LENGTH = 36;
|
19 | var AGENT_ID_ALLOWED_REGEXP = exports.AGENT_ID_ALLOWED_REGEXP = /^([a-z0-9_-]){1,36}$/i;
|
20 |
|
21 | var TYPES = exports.TYPES = {
|
22 | continuous: 'continuous',
|
23 | enum: 'enum',
|
24 | timezone: 'timezone',
|
25 | time_of_day: 'time_of_day',
|
26 | day_of_week: 'day_of_week',
|
27 | day_of_month: 'day_of_month',
|
28 | month_of_year: 'month_of_year'
|
29 | };
|
30 |
|
31 | var TYPE_ANY = exports.TYPE_ANY = 'any';
|
32 |
|
33 | var GENERATED_TIME_TYPES = exports.GENERATED_TIME_TYPES = [TYPES.time_of_day, TYPES.day_of_week, TYPES.day_of_month, TYPES.month_of_year];
|
34 |
|
35 | var OPERATORS = exports.OPERATORS = {
|
36 | IS: 'is',
|
37 | IN: '[in[',
|
38 | GTE: '>=',
|
39 | LT: '<'
|
40 | };
|
41 |
|
42 | var deprecation = exports.deprecation = _lodash2.default.memoize(function (oldFunction, newFunction) {
|
43 | return console.warn('DEPRECATION WARNING: the \'' + oldFunction + '\' function of the craft ai client is deprecated. It will be removed in the future, \'' + newFunction + '\' should be used instead.');
|
44 | }); |
\ | No newline at end of file |