budibase/packages/frontend-core/src/constants.js

114 lines
1.7 KiB
JavaScript
Raw Normal View History

/**
* Operator options for lucene queries
*/
export const OperatorOptions = {
Equals: {
value: "equal",
label: "Equals",
},
NotEquals: {
value: "notEqual",
label: "Not equals",
},
Empty: {
value: "empty",
label: "Is empty",
},
NotEmpty: {
value: "notEmpty",
label: "Is not empty",
},
StartsWith: {
value: "string",
label: "Starts with",
},
Like: {
value: "fuzzy",
label: "Like",
},
MoreThan: {
value: "rangeLow",
label: "More than",
},
LessThan: {
value: "rangeHigh",
label: "Less than",
},
Contains: {
value: "contains",
label: "Contains",
},
NotContains: {
2022-07-26 18:21:58 +02:00
value: "notContains",
label: "Does Not Contain",
},
2022-06-24 15:39:16 +02:00
In: {
value: "oneOf",
label: "Is in",
},
2022-07-27 14:02:46 +02:00
ContainsAny: {
value: "containsAny",
label: "Has any"
},
}
// Cookie names
export const Cookies = {
Auth: "budibase:auth",
CurrentApp: "budibase:currentapp",
ReturnUrl: "budibase:returnurl",
}
// Table names
export const TableNames = {
USERS: "ta_users",
}
/**
* API version header attached to all requests.
* Version changelog:
* v1:
* - Coerce types for search endpoint
*/
export const ApiVersion = "1"
// Role IDs
export const Roles = {
ADMIN: "ADMIN",
POWER: "POWER",
BASIC: "BASIC",
PUBLIC: "PUBLIC",
BUILDER: "BUILDER",
}
/**
* Maximum minimum range for SQL number values
*/
2022-06-21 10:40:37 +02:00
export const SqlNumberTypeRangeMap = {
integer: {
max: 2147483647,
min: -2147483648,
},
int: {
max: 2147483647,
min: -2147483648,
},
smallint: {
max: 32767,
min: -32768,
},
mediumint: {
max: 8388607,
min: -8388608,
},
}
2022-07-26 14:41:46 +02:00
export const ThemeOptions = [
"lightest",
"light",
"dark",
"darkest",
"nord",
"midnight",
]