Fix hello world application (#14880)
Updates of the hello-world application - remove the old hello-world application - adds an object "postCard" - adds a serverlessFunction `create-new-post-card` that calls the twenty api to create a new postCard record - add a route trigger /post-card/create?recipient=John
This commit is contained in:
@@ -1,2 +1 @@
|
||||
node_modules
|
||||
.yarn/install-state.gz
|
||||
|
||||
+942
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
yarnPath: .yarn/releases/yarn-4.9.2.cjs
|
||||
|
||||
nodeLinker: node-modules
|
||||
@@ -1,90 +1,37 @@
|
||||
# Hello World 👋
|
||||
# Hello world
|
||||
|
||||
A delightful Twenty CRM application that welcomes users with a friendly AI assistant!
|
||||
A minimal hello-world application built with an alpha version of the twenty-cli.
|
||||
|
||||
## 🌟 What it does
|
||||
⚠️ Since this project uses an early alpha release, expect breaking changes and evolving features.
|
||||
|
||||
This app provides a cheerful AI companion that:
|
||||
- 🎉 Welcomes new users with enthusiasm
|
||||
- 🚀 Helps users discover Twenty CRM features
|
||||
- 💡 Provides helpful tips and best practices
|
||||
- 🎯 Guides users through their first steps
|
||||
- ✨ Makes the CRM experience delightful
|
||||
This example will gradually gain complexity and capabilities as the twenty-cli matures with future updates.
|
||||
|
||||
## 🤖 Meet Your Friendly Assistant
|
||||
|
||||
The **Friendly Assistant** is your personal guide to Twenty CRM! This AI companion is:
|
||||
- Warm and welcoming to all users
|
||||
- Encouraging and supportive in every interaction
|
||||
- Clear and helpful with explanations
|
||||
- Excited about helping users succeed
|
||||
- Full of positive energy and emojis! 🌈
|
||||
## Requirements
|
||||
- twenty-cli `npm install -g twenty-cli`
|
||||
- an `apiKey`. Go to `/settings/api-webhooks` to generate one
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
### Development Mode
|
||||
## Install to your Twenty workspace
|
||||
|
||||
To start developing this app:
|
||||
- replace `<SET_YOUR_TWENTY_API>` with your apiKey
|
||||
|
||||
```bash
|
||||
# From the project root
|
||||
npx nx run twenty-cli:start -- app dev --path packages/twenty-apps/hello-world
|
||||
|
||||
# Or from this directory
|
||||
cd packages/twenty-apps/hello-world
|
||||
npx nx run twenty-cli:start -- app dev
|
||||
twenty auth login
|
||||
twenty app sync
|
||||
```
|
||||
|
||||
### Deployment
|
||||
## What it does
|
||||
- creates a new object `postCard` with a `name` field
|
||||
- creates a serverless function `create-new-post-card`
|
||||
- two triggers on `create-new-post-card`:
|
||||
- one route trigger on `GET` `/post-card/create?recipient=RecipientName`
|
||||
- one databaseEvent trigger on `people.created` events
|
||||
|
||||
To deploy this app to your Twenty instance:
|
||||
## Development
|
||||
|
||||
Run dev mode and see application updates on your workspace instantly
|
||||
|
||||
```bash
|
||||
npx nx run twenty-cli:start -- app deploy --path packages/twenty-apps/hello-world
|
||||
twenty app dev
|
||||
```
|
||||
|
||||
## 🎨 Customization
|
||||
|
||||
Want to make this app even more fun? You can:
|
||||
|
||||
1. **Update the greeting style** - Modify the agent's prompt in `twenty-app.json`
|
||||
2. **Change the personality** - Adjust the tone and approach
|
||||
3. **Add more features** - Extend the agent's capabilities
|
||||
4. **Customize the icon** - Pick your favorite emoji for the app and agent
|
||||
|
||||
## 💡 Example Interactions
|
||||
|
||||
Here's what users can expect from the Friendly Assistant:
|
||||
|
||||
> **User**: "I'm new to Twenty CRM, where should I start?"
|
||||
>
|
||||
> **Friendly Assistant**: "🎉 Welcome to Twenty CRM! I'm so excited you're here! Let's get you started on this amazing journey!
|
||||
>
|
||||
> Here are the perfect first steps:
|
||||
> 1. 👥 Add your first contacts
|
||||
> 2. 🏢 Set up your companies
|
||||
> 3. 🎯 Create your first opportunities
|
||||
> 4. 📊 Explore the dashboard to see your data come to life!
|
||||
>
|
||||
> Which one sounds most interesting to you? I'm here to guide you every step of the way! ✨"
|
||||
|
||||
## 🛠️ Technical Details
|
||||
|
||||
- **Agent Model**: Uses `auto` model selection for optimal performance
|
||||
- **Response Format**: Plain text with emoji support
|
||||
- **Universal ID**: `com.twenty.demo.hello-world.friendly-assistant`
|
||||
- **Integration**: Seamlessly works with Twenty CRM's agent system
|
||||
|
||||
## 🌈 Why This App?
|
||||
|
||||
This Hello World app demonstrates:
|
||||
- How to create engaging AI personalities
|
||||
- Best practices for user onboarding
|
||||
- The power of positive, helpful AI interactions
|
||||
- How simple apps can make a big impact on user experience
|
||||
|
||||
Perfect for new developers learning Twenty's app system, or as a starting point for more complex applications!
|
||||
|
||||
---
|
||||
|
||||
*Made with ❤️ for the Twenty community*
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/schemas/agent.schema.json",
|
||||
// Hello World Assistant Agent
|
||||
// A cheerful AI companion that welcomes users to Twenty CRM
|
||||
"standardId": "550e8400-e29b-41d4-a716-446655440001",
|
||||
"name": "helloWorldAssistant",
|
||||
"label": "Hello World Assistant 🤖 !",
|
||||
"description": "A cheerful AI companion that welcomes users and helps them navigate Twenty CRM",
|
||||
"icon": "👋",
|
||||
"prompt": "You are a friendly and enthusiastic AI assistant for Twenty CRM! Your job is to:\n\n🎉 Welcome new users with excitement and positivity\n🚀 Help users discover the amazing features of Twenty CRM\n💡 Provide helpful tips and best practices\n🎯 Guide users through their first steps\n✨ Make the CRM experience delightful and engaging\n\nAlways be:\n- Warm and welcoming\n- Encouraging and supportive \n- Clear and helpful in your explanations\n- Excited about helping users succeed\n\nUse emojis to make your responses more engaging, and remember that every interaction is a chance to make someone's day better! 🌈",
|
||||
"modelId": "auto",
|
||||
"responseFormat": {
|
||||
"type": "text"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/schemas/object.schema.json",
|
||||
"universalIdentifier": "54b589ca-eeed-4950-a176-358418b85c05",
|
||||
"standardId": "54b589ca-eeed-4950-a176-358418b85c05",
|
||||
"nameSingular": "postCard",
|
||||
"namePlural": "postCards",
|
||||
"labelSingular": "Post card",
|
||||
"labelPlural": "Post cards"
|
||||
}
|
||||
@@ -1,8 +1,17 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/schemas/app-manifest.schema.json",
|
||||
"standardId": "550e8400-e29b-41d4-a716-446655440000",
|
||||
"label": "Hello World 👋",
|
||||
"description": "A friendly AI companion that greets users and helps them get started with Twenty CRM",
|
||||
"icon": "🌟",
|
||||
"version": "1.0.0"
|
||||
"version": "0.0.1",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "^24.5.0",
|
||||
"npm": "please-use-yarn",
|
||||
"yarn": ">=4.0.2"
|
||||
},
|
||||
"packageManager": "yarn@4.9.2",
|
||||
"$schema": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/schemas/appManifest.schema.json",
|
||||
"universalIdentifier": "4ec0391d-18d5-411c-b2f3-266ddc1c3ef7",
|
||||
"name": "Hello world",
|
||||
"description": "A hello-world application example",
|
||||
"dependencies": {
|
||||
"axios": "^1.12.2"
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-cli/schemas/serverlessFunction.schema.json",
|
||||
"universalIdentifier": "e56d363b-0bdc-4d8a-a393-6f0d1c75bdcf",
|
||||
"name": "create-new-post-card",
|
||||
"triggers": [
|
||||
{
|
||||
"universalIdentifier": "203f1df3-4a82-4d06-a001-b8cf22a31156",
|
||||
"type": "databaseEvent",
|
||||
"eventName": "person.created"
|
||||
},
|
||||
{
|
||||
"universalIdentifier": "c9f84c8d-b26d-40d1-95dd-4f834ae5a2c6",
|
||||
"type": "route",
|
||||
"path": "/post-card/create",
|
||||
"httpMethod": "GET",
|
||||
"isAuthRequired": false
|
||||
}
|
||||
]
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
import axios from 'axios';
|
||||
|
||||
const TWENTY_API_KEY = '<SET_YOUR_TWENTY_API>';
|
||||
|
||||
export const main = async (params: { recipient: string }): Promise<object> => {
|
||||
const { recipient } = params;
|
||||
|
||||
const options = {
|
||||
method: 'POST',
|
||||
url: 'http://localhost:3000/rest/postCards',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${TWENTY_API_KEY}`,
|
||||
},
|
||||
data: { name: recipient ?? 'Unknown' },
|
||||
};
|
||||
|
||||
try {
|
||||
const { data } = await axios.request(options);
|
||||
|
||||
console.log(`New post card to "${recipient}" created`);
|
||||
|
||||
return { data };
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
};
|
||||
@@ -5,8 +5,244 @@ __metadata:
|
||||
version: 8
|
||||
cacheKey: 10c0
|
||||
|
||||
"root-workspace-0b6124@workspace:.":
|
||||
"Hello world@workspace:.":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "root-workspace-0b6124@workspace:."
|
||||
resolution: "Hello world@workspace:."
|
||||
dependencies:
|
||||
axios: "npm:^1.12.2"
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"async-function@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "async-function@npm:1.0.0"
|
||||
checksum: 10c0/669a32c2cb7e45091330c680e92eaeb791bc1d4132d827591e499cd1f776ff5a873e77e5f92d0ce795a8d60f10761dec9ddfe7225a5de680f5d357f67b1aac73
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"async-generator-function@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "async-generator-function@npm:1.0.0"
|
||||
checksum: 10c0/2c50ef856c543ad500d8d8777d347e3c1ba623b93e99c9263ecc5f965c1b12d2a140e2ab6e43c3d0b85366110696f28114649411cbcd10b452a92a2318394186
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"asynckit@npm:^0.4.0":
|
||||
version: 0.4.0
|
||||
resolution: "asynckit@npm:0.4.0"
|
||||
checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"axios@npm:^1.12.2":
|
||||
version: 1.12.2
|
||||
resolution: "axios@npm:1.12.2"
|
||||
dependencies:
|
||||
follow-redirects: "npm:^1.15.6"
|
||||
form-data: "npm:^4.0.4"
|
||||
proxy-from-env: "npm:^1.1.0"
|
||||
checksum: 10c0/80b063e318cf05cd33a4d991cea0162f3573481946f9129efb7766f38fde4c061c34f41a93a9f9521f02b7c9565ccbc197c099b0186543ac84a24580017adfed
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2":
|
||||
version: 1.0.2
|
||||
resolution: "call-bind-apply-helpers@npm:1.0.2"
|
||||
dependencies:
|
||||
es-errors: "npm:^1.3.0"
|
||||
function-bind: "npm:^1.1.2"
|
||||
checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"combined-stream@npm:^1.0.8":
|
||||
version: 1.0.8
|
||||
resolution: "combined-stream@npm:1.0.8"
|
||||
dependencies:
|
||||
delayed-stream: "npm:~1.0.0"
|
||||
checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"delayed-stream@npm:~1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "delayed-stream@npm:1.0.0"
|
||||
checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dunder-proto@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "dunder-proto@npm:1.0.1"
|
||||
dependencies:
|
||||
call-bind-apply-helpers: "npm:^1.0.1"
|
||||
es-errors: "npm:^1.3.0"
|
||||
gopd: "npm:^1.2.0"
|
||||
checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"es-define-property@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "es-define-property@npm:1.0.1"
|
||||
checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"es-errors@npm:^1.3.0":
|
||||
version: 1.3.0
|
||||
resolution: "es-errors@npm:1.3.0"
|
||||
checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1":
|
||||
version: 1.1.1
|
||||
resolution: "es-object-atoms@npm:1.1.1"
|
||||
dependencies:
|
||||
es-errors: "npm:^1.3.0"
|
||||
checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"es-set-tostringtag@npm:^2.1.0":
|
||||
version: 2.1.0
|
||||
resolution: "es-set-tostringtag@npm:2.1.0"
|
||||
dependencies:
|
||||
es-errors: "npm:^1.3.0"
|
||||
get-intrinsic: "npm:^1.2.6"
|
||||
has-tostringtag: "npm:^1.0.2"
|
||||
hasown: "npm:^2.0.2"
|
||||
checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"follow-redirects@npm:^1.15.6":
|
||||
version: 1.15.11
|
||||
resolution: "follow-redirects@npm:1.15.11"
|
||||
peerDependenciesMeta:
|
||||
debug:
|
||||
optional: true
|
||||
checksum: 10c0/d301f430542520a54058d4aeeb453233c564aaccac835d29d15e050beb33f339ad67d9bddbce01739c5dc46a6716dbe3d9d0d5134b1ca203effa11a7ef092343
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"form-data@npm:^4.0.4":
|
||||
version: 4.0.4
|
||||
resolution: "form-data@npm:4.0.4"
|
||||
dependencies:
|
||||
asynckit: "npm:^0.4.0"
|
||||
combined-stream: "npm:^1.0.8"
|
||||
es-set-tostringtag: "npm:^2.1.0"
|
||||
hasown: "npm:^2.0.2"
|
||||
mime-types: "npm:^2.1.12"
|
||||
checksum: 10c0/373525a9a034b9d57073e55eab79e501a714ffac02e7a9b01be1c820780652b16e4101819785e1e18f8d98f0aee866cc654d660a435c378e16a72f2e7cac9695
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"function-bind@npm:^1.1.2":
|
||||
version: 1.1.2
|
||||
resolution: "function-bind@npm:1.1.2"
|
||||
checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"generator-function@npm:^2.0.0":
|
||||
version: 2.0.1
|
||||
resolution: "generator-function@npm:2.0.1"
|
||||
checksum: 10c0/8a9f59df0f01cfefafdb3b451b80555e5cf6d76487095db91ac461a0e682e4ff7a9dbce15f4ecec191e53586d59eece01949e05a4b4492879600bbbe8e28d6b8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-intrinsic@npm:^1.2.6":
|
||||
version: 1.3.1
|
||||
resolution: "get-intrinsic@npm:1.3.1"
|
||||
dependencies:
|
||||
async-function: "npm:^1.0.0"
|
||||
async-generator-function: "npm:^1.0.0"
|
||||
call-bind-apply-helpers: "npm:^1.0.2"
|
||||
es-define-property: "npm:^1.0.1"
|
||||
es-errors: "npm:^1.3.0"
|
||||
es-object-atoms: "npm:^1.1.1"
|
||||
function-bind: "npm:^1.1.2"
|
||||
generator-function: "npm:^2.0.0"
|
||||
get-proto: "npm:^1.0.1"
|
||||
gopd: "npm:^1.2.0"
|
||||
has-symbols: "npm:^1.1.0"
|
||||
hasown: "npm:^2.0.2"
|
||||
math-intrinsics: "npm:^1.1.0"
|
||||
checksum: 10c0/9f4ab0cf7efe0fd2c8185f52e6f637e708f3a112610c88869f8f041bb9ecc2ce44bf285dfdbdc6f4f7c277a5b88d8e94a432374d97cca22f3de7fc63795deb5d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-proto@npm:^1.0.1":
|
||||
version: 1.0.1
|
||||
resolution: "get-proto@npm:1.0.1"
|
||||
dependencies:
|
||||
dunder-proto: "npm:^1.0.1"
|
||||
es-object-atoms: "npm:^1.0.0"
|
||||
checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"gopd@npm:^1.2.0":
|
||||
version: 1.2.0
|
||||
resolution: "gopd@npm:1.2.0"
|
||||
checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "has-symbols@npm:1.1.0"
|
||||
checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"has-tostringtag@npm:^1.0.2":
|
||||
version: 1.0.2
|
||||
resolution: "has-tostringtag@npm:1.0.2"
|
||||
dependencies:
|
||||
has-symbols: "npm:^1.0.3"
|
||||
checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"hasown@npm:^2.0.2":
|
||||
version: 2.0.2
|
||||
resolution: "hasown@npm:2.0.2"
|
||||
dependencies:
|
||||
function-bind: "npm:^1.1.2"
|
||||
checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"math-intrinsics@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "math-intrinsics@npm:1.1.0"
|
||||
checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mime-db@npm:1.52.0":
|
||||
version: 1.52.0
|
||||
resolution: "mime-db@npm:1.52.0"
|
||||
checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mime-types@npm:^2.1.12":
|
||||
version: 2.1.35
|
||||
resolution: "mime-types@npm:2.1.35"
|
||||
dependencies:
|
||||
mime-db: "npm:1.52.0"
|
||||
checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"proxy-from-env@npm:^1.1.0":
|
||||
version: 1.1.0
|
||||
resolution: "proxy-from-env@npm:1.1.0"
|
||||
checksum: 10c0/fe7dd8b1bdbbbea18d1459107729c3e4a2243ca870d26d34c2c1bcd3e4425b7bcc5112362df2d93cc7fb9746f6142b5e272fd1cc5c86ddf8580175186f6ad42b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -104,7 +104,11 @@ export class AppAddCommand {
|
||||
name: 'entity',
|
||||
message: `What entity do you want to create?`,
|
||||
default: '',
|
||||
choices: [SyncableEntity.SERVERLESS_FUNCTION, SyncableEntity.TRIGGER],
|
||||
choices: [
|
||||
SyncableEntity.SERVERLESS_FUNCTION,
|
||||
SyncableEntity.OBJECT,
|
||||
SyncableEntity.TRIGGER,
|
||||
],
|
||||
},
|
||||
]);
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.yarn/install-state.gz
|
||||
|
||||
@@ -1195,7 +1195,6 @@ export enum FeatureFlagKey {
|
||||
IS_CALENDAR_VIEW_ENABLED = 'IS_CALENDAR_VIEW_ENABLED',
|
||||
IS_CORE_VIEW_ENABLED = 'IS_CORE_VIEW_ENABLED',
|
||||
IS_CORE_VIEW_SYNCING_ENABLED = 'IS_CORE_VIEW_SYNCING_ENABLED',
|
||||
IS_DATABASE_EVENT_TRIGGER_ENABLED = 'IS_DATABASE_EVENT_TRIGGER_ENABLED',
|
||||
IS_DYNAMIC_SEARCH_FIELDS_ENABLED = 'IS_DYNAMIC_SEARCH_FIELDS_ENABLED',
|
||||
IS_EMAILING_DOMAIN_ENABLED = 'IS_EMAILING_DOMAIN_ENABLED',
|
||||
IS_GROUP_BY_ENABLED = 'IS_GROUP_BY_ENABLED',
|
||||
|
||||
@@ -1159,7 +1159,6 @@ export enum FeatureFlagKey {
|
||||
IS_CALENDAR_VIEW_ENABLED = 'IS_CALENDAR_VIEW_ENABLED',
|
||||
IS_CORE_VIEW_ENABLED = 'IS_CORE_VIEW_ENABLED',
|
||||
IS_CORE_VIEW_SYNCING_ENABLED = 'IS_CORE_VIEW_SYNCING_ENABLED',
|
||||
IS_DATABASE_EVENT_TRIGGER_ENABLED = 'IS_DATABASE_EVENT_TRIGGER_ENABLED',
|
||||
IS_DYNAMIC_SEARCH_FIELDS_ENABLED = 'IS_DYNAMIC_SEARCH_FIELDS_ENABLED',
|
||||
IS_EMAILING_DOMAIN_ENABLED = 'IS_EMAILING_DOMAIN_ENABLED',
|
||||
IS_GROUP_BY_ENABLED = 'IS_GROUP_BY_ENABLED',
|
||||
|
||||
+7
-16
@@ -10,7 +10,6 @@ import { type ObjectRecordEvent } from 'src/engine/core-modules/event-emitter/ty
|
||||
import { type ObjectRecordNonDestructiveEvent } from 'src/engine/core-modules/event-emitter/types/object-record-non-destructive-event';
|
||||
import { type ObjectRecordRestoreEvent } from 'src/engine/core-modules/event-emitter/types/object-record-restore.event';
|
||||
import { type ObjectRecordUpdateEvent } from 'src/engine/core-modules/event-emitter/types/object-record-update.event';
|
||||
import { FeatureFlagKey } from 'src/engine/core-modules/feature-flag/enums/feature-flag-key.enum';
|
||||
import { FeatureFlagService } from 'src/engine/core-modules/feature-flag/services/feature-flag.service';
|
||||
import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';
|
||||
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
|
||||
@@ -81,12 +80,6 @@ export class EntityEventsToDbListener {
|
||||
},
|
||||
}));
|
||||
|
||||
const isDatabaseEventTriggerEnabled =
|
||||
await this.featureFlagService.isFeatureEnabled(
|
||||
FeatureFlagKey.IS_DATABASE_EVENT_TRIGGER_ENABLED,
|
||||
batchEvent.workspaceId,
|
||||
);
|
||||
|
||||
const promises = [
|
||||
this.subscriptionsService.publish(batchEvent),
|
||||
this.webhookQueueService.add<
|
||||
@@ -100,15 +93,13 @@ export class EntityEventsToDbListener {
|
||||
),
|
||||
];
|
||||
|
||||
if (isDatabaseEventTriggerEnabled) {
|
||||
promises.push(
|
||||
this.triggerQueueService.add<WorkspaceEventBatch<T>>(
|
||||
CallDatabaseEventTriggerJobsJob.name,
|
||||
batchEvent,
|
||||
{ retryLimit: 3 },
|
||||
),
|
||||
);
|
||||
}
|
||||
promises.push(
|
||||
this.triggerQueueService.add<WorkspaceEventBatch<T>>(
|
||||
CallDatabaseEventTriggerJobsJob.name,
|
||||
batchEvent,
|
||||
{ retryLimit: 3 },
|
||||
),
|
||||
);
|
||||
|
||||
if (auditLogsEvents.length > 0) {
|
||||
promises.push(
|
||||
|
||||
-1
@@ -14,7 +14,6 @@ export enum FeatureFlagKey {
|
||||
IS_PAGE_LAYOUT_ENABLED = 'IS_PAGE_LAYOUT_ENABLED',
|
||||
IS_MESSAGE_FOLDER_CONTROL_ENABLED = 'IS_MESSAGE_FOLDER_CONTROL_ENABLED',
|
||||
IS_WORKFLOW_ITERATOR_ENABLED = 'IS_WORKFLOW_ITERATOR_ENABLED',
|
||||
IS_DATABASE_EVENT_TRIGGER_ENABLED = 'IS_DATABASE_EVENT_TRIGGER_ENABLED',
|
||||
IS_CALENDAR_VIEW_ENABLED = 'IS_CALENDAR_VIEW_ENABLED',
|
||||
IS_GROUP_BY_ENABLED = 'IS_GROUP_BY_ENABLED',
|
||||
IS_PUBLIC_DOMAIN_ENABLED = 'IS_PUBLIC_DOMAIN_ENABLED',
|
||||
|
||||
-1
@@ -137,7 +137,6 @@ describe('WorkspaceEntityManager', () => {
|
||||
IS_PAGE_LAYOUT_ENABLED: false,
|
||||
IS_MESSAGE_FOLDER_CONTROL_ENABLED: false,
|
||||
IS_WORKFLOW_ITERATOR_ENABLED: false,
|
||||
IS_DATABASE_EVENT_TRIGGER_ENABLED: false,
|
||||
IS_CALENDAR_VIEW_ENABLED: false,
|
||||
IS_GROUP_BY_ENABLED: true,
|
||||
IS_PUBLIC_DOMAIN_ENABLED: false,
|
||||
|
||||
-5
@@ -66,11 +66,6 @@ export const seedFeatureFlags = async (
|
||||
workspaceId: workspaceId,
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
key: FeatureFlagKey.IS_DATABASE_EVENT_TRIGGER_ENABLED,
|
||||
workspaceId: workspaceId,
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
key: FeatureFlagKey.IS_CALENDAR_VIEW_ENABLED,
|
||||
workspaceId: workspaceId,
|
||||
|
||||
Reference in New Issue
Block a user