2020-12-03 02:20:56 +13:00
|
|
|
const { BUILTIN_ROLE_IDS } = require("../utilities/security/roles")
|
2020-11-26 04:03:19 +13:00
|
|
|
|
2020-10-14 09:33:56 +13:00
|
|
|
const AuthTypes = {
|
|
|
|
APP: "app",
|
|
|
|
BUILDER: "builder",
|
|
|
|
EXTERNAL: "external",
|
|
|
|
}
|
|
|
|
|
2020-11-26 04:03:19 +13:00
|
|
|
const USERS_TABLE_SCHEMA = {
|
|
|
|
_id: "ta_users",
|
|
|
|
type: "table",
|
|
|
|
views: {},
|
|
|
|
name: "Users",
|
|
|
|
schema: {
|
2020-12-05 01:22:45 +13:00
|
|
|
email: {
|
2020-11-26 04:03:19 +13:00
|
|
|
type: "string",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
2020-12-05 01:22:45 +13:00
|
|
|
email: true,
|
2020-11-26 04:03:19 +13:00
|
|
|
length: {
|
|
|
|
maximum: "",
|
|
|
|
},
|
|
|
|
presence: true,
|
|
|
|
},
|
2020-12-05 01:22:45 +13:00
|
|
|
fieldName: "email",
|
|
|
|
name: "email",
|
2020-11-26 04:03:19 +13:00
|
|
|
},
|
2020-12-03 02:20:56 +13:00
|
|
|
roleId: {
|
|
|
|
fieldName: "roleId",
|
|
|
|
name: "roleId",
|
2020-11-26 04:03:19 +13:00
|
|
|
type: "options",
|
|
|
|
constraints: {
|
|
|
|
type: "string",
|
|
|
|
presence: false,
|
2020-12-09 01:20:37 +13:00
|
|
|
inclusion: Object.values(BUILTIN_ROLE_IDS),
|
2020-11-26 04:03:19 +13:00
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2020-12-05 01:22:45 +13:00
|
|
|
primaryDisplay: "email",
|
2020-11-26 04:03:19 +13:00
|
|
|
}
|
|
|
|
|
2021-02-11 06:55:19 +13:00
|
|
|
exports.FieldTypes = {
|
|
|
|
STRING: "string",
|
|
|
|
LONGFORM: "longform",
|
|
|
|
OPTIONS: "options",
|
|
|
|
NUMBER: "number",
|
|
|
|
BOOLEAN: "boolean",
|
|
|
|
DATETIME: "datetime",
|
|
|
|
ATTACHMENT: "attachment",
|
|
|
|
LINK: "link",
|
|
|
|
AUTO: "auto",
|
|
|
|
}
|
|
|
|
|
2020-10-14 09:33:56 +13:00
|
|
|
exports.AuthTypes = AuthTypes
|
2020-11-26 04:03:19 +13:00
|
|
|
exports.USERS_TABLE_SCHEMA = USERS_TABLE_SCHEMA
|
2020-12-15 07:31:48 +13:00
|
|
|
exports.BUILDER_CONFIG_DB = "builder-config-db"
|
|
|
|
exports.HOSTING_DOC = "hosting-doc"
|
2021-02-02 07:08:06 +13:00
|
|
|
exports.OBJ_STORE_DIRECTORY = "/app-assets/assets"
|
2021-02-06 05:45:23 +13:00
|
|
|
exports.BaseQueryVerbs = {
|
|
|
|
CREATE: "create",
|
|
|
|
READ: "read",
|
|
|
|
UPDATE: "update",
|
|
|
|
DELETE: "delete",
|
|
|
|
}
|