2022-01-20 12:19:37 +01:00
|
|
|
/**
|
|
|
|
* 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: {
|
2022-07-19 15:11:40 +02:00
|
|
|
value: "contains",
|
2022-01-20 12:19:37 +01:00
|
|
|
label: "Contains",
|
|
|
|
},
|
|
|
|
NotContains: {
|
2022-07-26 18:21:58 +02:00
|
|
|
value: "notContains",
|
2022-01-20 12:19:37 +01:00
|
|
|
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",
|
2022-07-27 14:19:47 +02:00
|
|
|
label: "Has any",
|
2022-07-27 14:02:46 +02:00
|
|
|
},
|
2022-01-20 12:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Cookie names
|
|
|
|
export const Cookies = {
|
|
|
|
Auth: "budibase:auth",
|
|
|
|
CurrentApp: "budibase:currentapp",
|
|
|
|
ReturnUrl: "budibase:returnurl",
|
|
|
|
}
|
|
|
|
|
|
|
|
// Table names
|
2022-01-20 10:40:53 +01:00
|
|
|
export const TableNames = {
|
|
|
|
USERS: "ta_users",
|
|
|
|
}
|
2022-01-18 10:39:19 +01:00
|
|
|
|
2022-08-03 16:16:26 +02:00
|
|
|
export const BudibaseRoles = {
|
|
|
|
AppUser: "appUser",
|
|
|
|
Developer: "developer",
|
|
|
|
Admin: "admin",
|
|
|
|
}
|
|
|
|
|
|
|
|
export const BudibaseRoleOptions = [
|
|
|
|
{ label: "App User", value: BudibaseRoles.AppUser },
|
|
|
|
{ label: "Developer", value: BudibaseRoles.Developer },
|
|
|
|
{ label: "Admin", value: BudibaseRoles.Admin },
|
2022-06-29 20:03:32 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
export const BuilderRoleDescriptions = [
|
|
|
|
{
|
2022-08-03 16:16:26 +02:00
|
|
|
value: BudibaseRoles.AppUser,
|
2022-06-29 20:03:32 +02:00
|
|
|
icon: "User",
|
|
|
|
label: "App user - Only has access to published apps",
|
|
|
|
},
|
|
|
|
{
|
2022-08-03 16:16:26 +02:00
|
|
|
value: BudibaseRoles.Developer,
|
2022-06-29 20:03:32 +02:00
|
|
|
icon: "Hammer",
|
|
|
|
label: "Developer - Access to the app builder",
|
|
|
|
},
|
|
|
|
{
|
2022-08-03 16:16:26 +02:00
|
|
|
value: BudibaseRoles.Admin,
|
2022-06-29 20:03:32 +02:00
|
|
|
icon: "Draw",
|
|
|
|
label: "Admin - Full access",
|
|
|
|
},
|
|
|
|
]
|
|
|
|
|
2022-07-13 16:46:10 +02:00
|
|
|
export const PlanType = {
|
|
|
|
FREE: "free",
|
|
|
|
TEAM: "team",
|
|
|
|
BUSINESS: "business",
|
|
|
|
ENTERPRISE: "enterprise",
|
|
|
|
}
|
|
|
|
|
2022-01-18 10:39:19 +01:00
|
|
|
/**
|
2022-01-20 12:19:37 +01:00
|
|
|
* API version header attached to all requests.
|
|
|
|
* Version changelog:
|
2022-01-18 10:39:19 +01:00
|
|
|
* v1:
|
|
|
|
* - Coerce types for search endpoint
|
|
|
|
*/
|
2022-01-20 12:19:37 +01:00
|
|
|
export const ApiVersion = "1"
|
2022-04-28 16:13:33 +02:00
|
|
|
|
2022-07-21 10:52:01 +02:00
|
|
|
export const Features = {
|
|
|
|
USER_GROUPS: "userGroups",
|
|
|
|
}
|
|
|
|
|
2022-04-28 16:13:33 +02:00
|
|
|
// Role IDs
|
|
|
|
export const Roles = {
|
|
|
|
ADMIN: "ADMIN",
|
|
|
|
POWER: "POWER",
|
|
|
|
BASIC: "BASIC",
|
|
|
|
PUBLIC: "PUBLIC",
|
|
|
|
BUILDER: "BUILDER",
|
|
|
|
}
|
2022-06-20 18:26:35 +02:00
|
|
|
/**
|
|
|
|
* Maximum minimum range for SQL number values
|
|
|
|
*/
|
2022-06-21 10:40:37 +02:00
|
|
|
export const SqlNumberTypeRangeMap = {
|
2022-06-20 18:26:35 +02:00
|
|
|
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
|
|
|
|
2022-07-27 17:37:35 +02:00
|
|
|
export const Themes = [
|
|
|
|
{
|
|
|
|
class: "lightest",
|
|
|
|
name: "Lightest",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
class: "light",
|
|
|
|
name: "Light",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
class: "dark",
|
|
|
|
name: "Dark",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
class: "darkest",
|
|
|
|
name: "Darkest",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
class: "nord",
|
|
|
|
name: "Nord",
|
|
|
|
base: "darkest",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
class: "midnight",
|
|
|
|
name: "Midnight",
|
|
|
|
base: "darkest",
|
|
|
|
},
|
2022-07-26 14:41:46 +02:00
|
|
|
]
|