budibase/packages/worker/src/constants/index.js

148 lines
3.3 KiB
JavaScript
Raw Normal View History

exports.LOGO_URL =
"https://d33wubrfki0l68.cloudfront.net/aac32159d7207b5085e74a7ef67afbb7027786c5/2b1fd/img/logo/bb-emblem.svg"
exports.UserStatus = {
ACTIVE: "active",
INACTIVE: "inactive",
}
2021-04-19 12:34:07 +02:00
exports.Groups = {
ALL_USERS: "all_users",
}
2021-04-20 19:14:36 +02:00
exports.Configs = {
SETTINGS: "settings",
ACCOUNT: "account",
SMTP: "smtp",
2021-04-21 22:08:04 +02:00
GOOGLE: "google",
2021-04-20 19:14:36 +02:00
}
2021-04-21 19:43:20 +02:00
exports.ConfigUploads = {
LOGO: "logo",
}
const TemplateTypes = {
2021-04-21 19:15:57 +02:00
EMAIL: "email",
}
const EmailTemplatePurpose = {
BASE: "base",
STYLES: "styles",
2021-04-21 19:15:57 +02:00
PASSWORD_RECOVERY: "password_recovery",
INVITATION: "invitation",
WELCOME: "welcome",
2021-04-21 19:15:57 +02:00
CUSTOM: "custom",
}
const TemplateBindings = {
2021-05-11 15:44:43 +02:00
PLATFORM_URL: {
name: "platformUrl",
description: "The URL used to access the budibase platform",
},
COMPANY: {
name: "company",
description: "The name of your organization",
},
LOGO_URL: {
name: "logoUrl",
description: "The URL of your organizations logo.",
},
EMAIL: {
name: "email",
description: "The recipients email address.",
},
USER: {
name: "user",
description: "The recipients user object.",
},
REQUEST: {
name: "request",
description: "Additional request metadata.",
},
DOCS_URL: {
name: "docsUrl",
description: "Organization documentation URL.",
},
LOGIN_URL: {
name: "loginUrl",
description: "The URL used to log into the organization budibase instance.",
},
CURRENT_YEAR: {
name: "currentYear",
description: "The current year.",
},
CURRENT_DATE: {
name: "currentDate",
description: "The current date.",
},
}
const TemplateMetadata = {
[TemplateTypes.EMAIL]: [
{
name: "Styling",
purpose: EmailTemplatePurpose.STYLES,
},
{
name: "Base Format",
purpose: EmailTemplatePurpose.BASE,
2021-05-11 15:44:43 +02:00
bindings: [
{
name: "body",
description: "The main body of another email template.",
},
{
name: "styles",
description: "The contents of the Styling email template.",
},
],
},
{
name: "Password Recovery",
purpose: EmailTemplatePurpose.PASSWORD_RECOVERY,
2021-05-11 15:44:43 +02:00
bindings: [
{
name: "resetUrl",
description:
"The URL the recipient must click to reset their password.",
},
{
name: "resetCode",
description:
"The temporary password reset code used in the recipients password reset URL.",
},
],
},
{
name: "New User Invitation",
purpose: EmailTemplatePurpose.INVITATION,
2021-05-11 15:44:43 +02:00
bindings: [
{
name: "inviteUrl",
description:
"The URL the recipient must click to accept the invitation and activate their account.",
},
{
name: "inviteCode",
description:
"The temporary invite code used in the recipients invitation URL.",
},
],
},
{
name: "Custom",
purpose: EmailTemplatePurpose.CUSTOM,
2021-04-22 17:06:29 +02:00
},
],
}
2021-04-21 19:15:57 +02:00
// all purpose combined
exports.TemplatePurpose = {
...EmailTemplatePurpose,
}
exports.TemplateTypes = TemplateTypes
exports.EmailTemplatePurpose = EmailTemplatePurpose
exports.TemplateMetadata = TemplateMetadata
exports.TemplateBindings = TemplateBindings
2021-04-23 19:54:12 +02:00
exports.GLOBAL_OWNER = "global"