budibase/packages/shared-core/src/constants/index.ts

182 lines
2.9 KiB
TypeScript
Raw Normal View History

2023-12-12 10:21:10 +01:00
export * from "./api"
2024-04-16 14:16:13 +02:00
export * from "./fields"
2023-12-12 10:21:10 +01:00
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 or equal to",
},
LessThan: {
value: "rangeHigh",
label: "Less than or equal to",
},
Contains: {
value: "contains",
label: "Contains",
},
NotContains: {
value: "notContains",
label: "Does not contain",
},
In: {
value: "oneOf",
label: "Is in",
},
ContainsAny: {
value: "containsAny",
label: "Has any",
},
}
export const SqlNumberTypeRangeMap = {
integer: {
max: 2147483647,
min: -2147483648,
},
int: {
max: 2147483647,
min: -2147483648,
},
smallint: {
max: 32767,
min: -32768,
},
mediumint: {
max: 8388607,
min: -8388608,
},
}
export enum SocketEvent {
UserUpdate = "UserUpdate",
UserDisconnect = "UserDisconnect",
Heartbeat = "Heartbeat",
}
export enum GridSocketEvent {
RowChange = "RowChange",
DatasourceChange = "DatasourceChange",
2023-07-31 12:21:11 +02:00
SelectDatasource = "SelectDatasource",
SelectCell = "SelectCell",
}
export enum BuilderSocketEvent {
SelectApp = "SelectApp",
TableChange = "TableChange",
DatasourceChange = "DatasourceChange",
LockTransfer = "LockTransfer",
ScreenChange = "ScreenChange",
AppMetadataChange = "AppMetadataChange",
SelectResource = "SelectResource",
AppPublishChange = "AppPublishChange",
AutomationChange = "AutomationChange",
}
2023-05-31 17:08:35 +02:00
export const SocketSessionTTL = 60
export const ValidQueryNameRegex = /^[^()]*$/
export const ValidColumnNameRegex = /^[_a-zA-Z0-9\s]*$/g
export const ValidSnippetNameRegex = /^[a-z_][a-z0-9_]*$/i
2024-02-13 16:14:03 +01:00
export const REBOOT_CRON = "@reboot"
export const InvalidFileExtensions = [
2023-11-21 12:26:25 +01:00
"7z",
"action",
"apk",
"app",
"bat",
"bin",
"cab",
"cmd",
"com",
"command",
"cpl",
"csh",
"ex_",
"exe",
"gadget",
"inf1",
"ins",
"inx",
"ipa",
"isu",
"job",
"js",
"jse",
"ksh",
"lnk",
"msc",
"msi",
"msp",
"mst",
"osx",
"out",
"paf",
"php",
"pif",
"prg",
"ps1",
"reg",
"rgs",
"run",
"scr",
"sct",
"shb",
"shs",
2023-11-21 12:26:25 +01:00
"tar",
"u3p",
"vb",
"vbe",
"vbs",
"vbscript",
"wasm",
"workflow",
"ws",
"wsf",
"wsh",
2023-11-21 12:26:25 +01:00
"zip",
]
2024-03-12 13:45:09 +01:00
export enum BpmCorrelationKey {
2024-03-14 13:15:35 +01:00
ONBOARDING = "budibase:onboarding:correlationkey",
2024-03-12 13:45:09 +01:00
}
export enum BpmInstanceKey {
2024-03-14 13:15:35 +01:00
ONBOARDING = "budibase:onboarding:instancekey",
2024-03-12 13:45:09 +01:00
}
export enum BpmStatusKey {
2024-03-14 13:15:35 +01:00
ONBOARDING = "budibase:onboarding:status",
2024-03-12 13:45:09 +01:00
}
export enum BpmStatusValue {
STARTED = "started",
COMPLETING_ACCOUNT_INFO = "completing_account_info",
2024-03-14 15:35:45 +01:00
VERIFYING_EMAIL = "verifying_email",
2024-03-12 13:45:09 +01:00
COMPLETED = "completed",
}