2022-01-20 12:19:37 +01:00
|
|
|
/**
|
|
|
|
* Operator options for lucene queries
|
|
|
|
*/
|
2024-06-24 15:31:27 +02:00
|
|
|
export {
|
|
|
|
OperatorOptions,
|
|
|
|
SqlNumberTypeRangeMap,
|
|
|
|
DEFAULT_BB_DATASOURCE_ID,
|
|
|
|
} from "@budibase/shared-core"
|
2023-08-31 15:49:08 +02:00
|
|
|
export { Feature as Features } from "@budibase/types"
|
2024-03-12 13:45:09 +01:00
|
|
|
import { BpmCorrelationKey } from "@budibase/shared-core"
|
2024-04-26 12:23:11 +02:00
|
|
|
import { FieldType, BBReferenceFieldSubType } from "@budibase/types"
|
2022-01-20 12:19:37 +01:00
|
|
|
|
2024-05-24 16:38:54 +02:00
|
|
|
export const BannedSearchTypes = [
|
|
|
|
FieldType.LINK,
|
2024-07-22 10:13:13 +02:00
|
|
|
FieldType.ATTACHMENT_SINGLE,
|
2024-05-24 16:38:54 +02:00
|
|
|
FieldType.ATTACHMENTS,
|
|
|
|
FieldType.FORMULA,
|
|
|
|
FieldType.JSON,
|
2024-07-11 17:39:49 +02:00
|
|
|
FieldType.ATTACHMENT_SINGLE,
|
2024-07-22 10:13:13 +02:00
|
|
|
FieldType.SIGNATURE_SINGLE,
|
2024-05-24 16:38:54 +02:00
|
|
|
"jsonarray",
|
|
|
|
"queryarray",
|
|
|
|
]
|
|
|
|
|
2022-01-20 12:19:37 +01:00
|
|
|
// Cookie names
|
|
|
|
export const Cookies = {
|
|
|
|
Auth: "budibase:auth",
|
|
|
|
CurrentApp: "budibase:currentapp",
|
|
|
|
ReturnUrl: "budibase:returnurl",
|
2022-09-15 12:59:46 +02:00
|
|
|
AccountReturnUrl: "budibase:account:returnurl",
|
2024-03-12 13:45:09 +01:00
|
|
|
OnboardingProcessCorrelationKey: BpmCorrelationKey.ONBOARDING,
|
2022-01-20 12:19:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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",
|
2023-11-23 15:02:29 +01:00
|
|
|
Creator: "creator",
|
2022-08-03 16:16:26 +02:00
|
|
|
Admin: "admin",
|
2024-08-30 18:29:38 +02:00
|
|
|
Owner: "owner",
|
2022-08-03 16:16:26 +02:00
|
|
|
}
|
|
|
|
|
2023-09-05 10:58:05 +02:00
|
|
|
export const BudibaseRoleOptionsOld = [
|
2023-11-23 15:12:10 +01:00
|
|
|
{
|
|
|
|
label: "Developer",
|
|
|
|
value: BudibaseRoles.Developer,
|
|
|
|
},
|
2023-09-05 10:58:05 +02:00
|
|
|
]
|
2022-08-03 16:16:26 +02:00
|
|
|
export const BudibaseRoleOptions = [
|
2023-08-29 15:40:56 +02:00
|
|
|
{
|
2023-11-23 15:12:10 +01:00
|
|
|
label: "Account admin",
|
|
|
|
value: BudibaseRoles.Admin,
|
2023-08-29 15:40:56 +02:00
|
|
|
subtitle: "Has full access to all apps and settings in your account",
|
2024-08-30 18:29:38 +02:00
|
|
|
sortOrder: 1,
|
2023-08-29 15:40:56 +02:00
|
|
|
},
|
|
|
|
{
|
2023-11-23 15:12:10 +01:00
|
|
|
label: "Creator",
|
|
|
|
value: BudibaseRoles.Creator,
|
|
|
|
subtitle: "Can create and edit apps they have access to",
|
2024-08-30 18:29:38 +02:00
|
|
|
sortOrder: 2,
|
2023-11-23 15:12:10 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "App user",
|
|
|
|
value: BudibaseRoles.AppUser,
|
|
|
|
subtitle: "Can only use published apps they have access to",
|
2024-08-30 18:29:38 +02:00
|
|
|
sortOrder: 3,
|
2023-08-29 15:40:56 +02:00
|
|
|
},
|
|
|
|
]
|
2024-08-30 18:29:38 +02:00
|
|
|
export const ExtendedBudibaseRoleOptions = [
|
|
|
|
{
|
|
|
|
label: "Account holder",
|
|
|
|
value: BudibaseRoles.Owner,
|
|
|
|
sortOrder: 0,
|
|
|
|
},
|
|
|
|
].concat(BudibaseRoleOptions)
|
2023-08-29 15:40:56 +02:00
|
|
|
|
2022-07-13 16:46:10 +02:00
|
|
|
export const PlanType = {
|
|
|
|
FREE: "free",
|
|
|
|
TEAM: "team",
|
2022-09-29 10:17:22 +02:00
|
|
|
PRO: "pro",
|
2022-07-13 16:46:10 +02:00
|
|
|
BUSINESS: "business",
|
|
|
|
ENTERPRISE: "enterprise",
|
2024-05-07 13:44:57 +02:00
|
|
|
ENTERPRISE_BASIC_TRIAL: "enterprise_basic_trial",
|
2022-07-13 16:46:10 +02:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
|
// Role IDs
|
|
|
|
export const Roles = {
|
|
|
|
ADMIN: "ADMIN",
|
|
|
|
POWER: "POWER",
|
|
|
|
BASIC: "BASIC",
|
|
|
|
PUBLIC: "PUBLIC",
|
|
|
|
BUILDER: "BUILDER",
|
2023-08-24 12:38:12 +02:00
|
|
|
CREATOR: "CREATOR",
|
2022-04-28 16:13:33 +02:00
|
|
|
}
|
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
|
|
|
]
|
2023-01-23 20:18:02 +01:00
|
|
|
|
|
|
|
export const EventPublishType = {
|
|
|
|
ENV_VAR_UPGRADE_PANEL_OPENED: "environment_variable_upgrade_panel_opened",
|
|
|
|
}
|
2024-02-02 15:59:45 +01:00
|
|
|
|
|
|
|
export const ContextScopes = {
|
|
|
|
Local: "local",
|
|
|
|
Global: "global",
|
|
|
|
}
|
2024-04-10 11:52:19 +02:00
|
|
|
|
|
|
|
export const TypeIconMap = {
|
|
|
|
[FieldType.STRING]: "Text",
|
|
|
|
[FieldType.OPTIONS]: "Dropdown",
|
2024-04-10 12:03:46 +02:00
|
|
|
[FieldType.DATETIME]: "Calendar",
|
2024-04-10 11:52:19 +02:00
|
|
|
[FieldType.BARCODEQR]: "Camera",
|
2024-05-17 18:04:15 +02:00
|
|
|
[FieldType.SIGNATURE_SINGLE]: "AnnotatePen",
|
2024-04-10 11:52:19 +02:00
|
|
|
[FieldType.LONGFORM]: "TextAlignLeft",
|
2024-04-10 12:01:41 +02:00
|
|
|
[FieldType.ARRAY]: "Duplicate",
|
2024-04-10 11:52:19 +02:00
|
|
|
[FieldType.NUMBER]: "123",
|
|
|
|
[FieldType.BOOLEAN]: "Boolean",
|
2024-05-07 14:57:40 +02:00
|
|
|
[FieldType.ATTACHMENTS]: "DocumentFragmentGroup",
|
|
|
|
[FieldType.ATTACHMENT_SINGLE]: "DocumentFragment",
|
2024-04-10 11:52:19 +02:00
|
|
|
[FieldType.LINK]: "DataCorrelated",
|
|
|
|
[FieldType.FORMULA]: "Calculator",
|
|
|
|
[FieldType.JSON]: "Brackets",
|
|
|
|
[FieldType.BIGINT]: "TagBold",
|
2024-04-10 12:06:53 +02:00
|
|
|
[FieldType.AUTO]: "MagicWand",
|
2024-04-10 11:52:19 +02:00
|
|
|
[FieldType.BB_REFERENCE]: {
|
2024-05-03 17:29:47 +02:00
|
|
|
[BBReferenceFieldSubType.USER]: "UserGroup",
|
2024-04-26 12:23:11 +02:00
|
|
|
[BBReferenceFieldSubType.USERS]: "UserGroup",
|
2024-04-10 11:52:19 +02:00
|
|
|
},
|
2024-04-22 12:32:51 +02:00
|
|
|
[FieldType.BB_REFERENCE_SINGLE]: {
|
2024-04-26 12:47:35 +02:00
|
|
|
[BBReferenceFieldSubType.USER]: "User",
|
2024-04-22 12:32:51 +02:00
|
|
|
},
|
2024-04-10 11:52:19 +02:00
|
|
|
}
|
2024-05-21 10:03:53 +02:00
|
|
|
|
2024-05-21 15:00:02 +02:00
|
|
|
export const OptionColours = [...new Array(12).keys()].map(idx => {
|
2024-05-21 10:03:53 +02:00
|
|
|
return `hsla(${((idx + 1) * 222) % 360}, 90%, 75%, 0.3)`
|
|
|
|
})
|
2024-09-02 10:02:28 +02:00
|
|
|
|
|
|
|
export const FilterOperator = {
|
|
|
|
ANY: "any",
|
|
|
|
ALL: "all",
|
|
|
|
}
|
|
|
|
|
|
|
|
export const OnEmptyFilter = {
|
|
|
|
RETURN_ALL: "all",
|
|
|
|
RETURN_NONE: "none",
|
|
|
|
}
|