# v1.16.0
Max's file [https://hackmd.io/6BtgKKIfTquR--KMlTaDKA?edit]
## DB
### Roles
```
db.getCollection("roles").updateMany({ "roleId": { $in: [9, 8] }, },
{
$push: {
"systemFunctionIds": {
"id": 533,
"availablePermissionTypeIds": [
2
]
}
}
})
// Add Zapier routes
db.getCollection("roles").updateMany({ "roleId": { $in: [9, 8] }, },
{
$push: {
"systemFunctionIds": {
"id": 533,
"availablePermissionTypeIds": [
2
]
}
}
})
```
### System config
```
const nodeEnv = 'uat';
db.systemConfigs.updateOne({ nodeEnv }, {
$set: {
'templates.admin.newUserAwaiting': {
"templateId": "d-fd54486c2bc7469e8ea2ca27ad7302d4",
"subject": "A New User Is Waiting Approval To Join Your Workspace",
"header": {
"logo": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f722e370db9f222e5b03558_FullColor_Rectangle_Small320x132.png",
"title": ""
},
"body": {
"greeting": "Hi,",
"p1": "You're receiving this email because you are an administrator level user in the {{workspace.name}} workspace in Rake. A new user has requested to join the workspace usign your workspace invite link and is awaiting approval.",
"userFirstName": "Test",
"userLastName": "User",
"userEmail": "testuser@somedomain.com",
"p2": "Please click or tap the button or link below to open the Rake app to approve or decline the user's request.",
"c2a_link": "https://somewhere.com?abc=13&def=456",
"c2a_button": "Manage users in rake app",
"p3": "Your current workspace invite link settings require an administrator approval for users who join through the workspace invite link method. To learn more about how to manage your workspace invite link, visit",
"sincerely": "Sincerely,",
"signature": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f723e634165e2a3f1edb20a_email_signature_RakeTeam.png"
},
"footer": {
"company": "Rake LLC | 19740 Governors Highway, Suite 115 | Flossmoor, IL 60422 USA",
"website": "https://rake.ai"
}
}
}
});
db.systemConfigs.updateOne({ nodeEnv }, {
$set: {
'templates.admin.newUserApproved': {
"templateId": "d-8ed6b32878764011bc8e422e4c9afef4",
"subject": "Welcome To Rake",
"header": {
"logo": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f722e370db9f222e5b03558_FullColor_Rectangle_Small320x132.png",
"title": ""
},
"body": {
"greeting": "Congratulations {{systemUser.firstName}},",
"p1": "You've been approved to join the {{workspace.name}} workspace in Rake. Please click or tap the button or link below to log in.",
"c2a_link": "{{workspace.workspaceURL}}",
"c2a_button": "Login to Rake",
"p3": "Learn more about using Rake by reading our",
"sincerely": "Sincerely,",
"signature": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f723e634165e2a3f1edb20a_email_signature_RakeTeam.png"
},
"footer": {
"company": "Rake LLC | 19740 Governors Highway, Suite 115 | Flossmoor, IL 60422 USA",
"website": "https://rake.ai"
}
}
}
});
db.systemConfigs.updateOne({ nodeEnv }, {
$set: {
'templates.admin.newUserDeclined': {
"templateId": "d-ccd78405e8e342f599bb37d7d676175e",
"subject":"Your Rake Workspace Request",
"header": {
"logo": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f722e370db9f222e5b03558_FullColor_Rectangle_Small320x132.png",
"title": ""
},
"body": {
"greeting": "Hi,",
"p1": "Your request to join the {{workspace.name}} workspace in Rake was declined. Sometimes mistakes happen, so be sure to follow-up with the workspace administrator if you feel you've received this message in error.",
"p3": "Learn more about using Rake, or create your own workspace at",
"sincerely": "Sincerely,",
"signature": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f723e634165e2a3f1edb20a_email_signature_RakeTeam.png"
},
"footer": {
"company": "Rake LLC | 19740 Governors Highway, Suite 115 | Flossmoor, IL 60422 USA",
"website": "https://rake.ai"
}
}
}
});
db.systemConfigs.updateOne({ nodeEnv }, {
$set: {
'templates.admin.invitation.byLink': {
"templateId": "d-a3c119fdf8a54da78afc58759f49e63f",
"subject": "Verify Your Email",
"header": {
"logo": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f722e370db9f222e5b03558_FullColor_Rectangle_Small320x132.png",
"title": "Verify Your Email"
},
"body": {
"greeting": "Welcome to Rake!",
"p1": "You recently started registration to join the {{workspaceName}} workspace in Rake. A valid email address is critical as it helps us communicate with you to provide support, recover a password, and send important notifications.",
"p2": "Please click or tap the verify my email button or copy and paste the link provided into your browser to continue the registration process.",
"c2a_link": "https://workspace.rake.ai/getting-started/register?token=abc123def456ghi789",
"c2a_button": "Verify My Email",
"p3": "Let's get the conversation started!",
"sincerely": "Sincerely,",
"signature": "https://uploads-ssl.webflow.com/5d654ea941869b347d09667a/5f723e634165e2a3f1edb20a_email_signature_RakeTeam.png"
},
"footer": {
"company": "Rake LLC | 19740 Governors Highway, Suite 115 | Flossmoor, IL 60422 USA",
"website": "https://rake.ai"
}
}
}
});
```
### System functions
```
db.getCollection("systemFunctions").insert({
"systemApplicationId": 0,
"systemFunctionId": 533,
"function": "/workspaces/:workspaceId/invitations/system-users/:systemUserId",
"description": "Approve or reject registration of user",
"parentId": 399,
"permissionLevel": "workspace",
"availablePermissionTypeIds": [
2
]
})
db.getCollection("systemFunctions").insert({
"systemApplicationId": 0,
"systemFunctionId": 534,
"function": "/workspaces/:workspaceId/zapier",
"description": "Zapier platform CRUD",
"parentId": 535,
"permissionLevel": "workspace",
"availablePermissionTypeIds": [
1,2,3,4
]
})
db.getCollection("systemFunctions").insert({
"systemApplicationId": 0,
"systemFunctionId": 535,
"function": "/zapier",
"description": "Zapier platform",
"parentId": 66,
"permissionLevel": "workspace",
"availablePermissionTypeIds": [
1,2,3,4
]
})
```
### Events
- add system event:
```
db.getCollection("events").insert({
"systemEventId": -134,
"name": "Registration with approval flow",
"systemReference": "registration.preRegistered"
})
db.getCollection("events").insert({
"systemEventId": -135,
"name": "Registration with approval flow was approved",
"systemReference": "registration.preRegisteredApproved"
})
db.getCollection("events").insert({
"systemEventId": -136,
"name": "Registration with approval flow was rejected",
"systemReference": "registration.preRegisteredRejected"
});
db.getCollection("events").insert({
"systemEventId": -131,
"name": "Rake user app. Channel was archived",
"systemReference": "rakeUserApp.channedArchived"
})
db.getCollection("events").insert({
"systemEventId": -132,
"name": "Rake user app. Customerl was created",
"systemReference": "rakeUserApp.customerCreated"
})
db.getCollection("events").insert({
"systemEventId": -133,
"name": "Rake user app. Customerl was updated",
"systemReference": "rakeUserApp.customerUpdated"
})
```
### Event trigger
## Services
- core (v1.16)
- worker (v1.16)
- event-trigger (v1.16)
- permissions (v1.16)
- rake-user-app-worker (develop)