data-primals-engine 1.2.6-rc3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -2
- package/client/package-lock.json +247 -4354
- package/client/package.json +16 -15
- package/client/src/App.jsx +13 -20
- package/client/src/App.scss +1 -0
- package/client/src/AssistantChat.jsx +5 -4
- package/client/src/DataEditor.jsx +2 -2
- package/client/src/DataTable.jsx +47 -3
- package/client/src/ExportDialog.jsx +2 -2
- package/client/src/Field.jsx +6 -18
- package/client/src/KanbanCard.jsx +4 -2
- package/client/src/KanbanConfigModal.jsx +5 -7
- package/client/src/ModelCreatorField.jsx +9 -9
- package/client/src/PackGallery.jsx +89 -9
- package/client/src/PackGallery.scss +58 -4
- package/client/src/RTETrans.jsx +11 -0
- package/client/src/RelationValue.jsx +3 -4
- package/client/src/constants.js +1 -1
- package/client/src/core/data.js +2 -1
- package/client/src/translations.js +80 -0
- package/package.json +8 -1
- package/server.js +4 -4
- package/src/constants.js +6 -0
- package/src/defaultModels.js +23 -10
- package/src/filter.js +35 -5
- package/src/i18n.js +1 -1
- package/src/modules/{assistant.js → assistant/assistant.js} +42 -27
- package/src/modules/assistant/constants.js +16 -0
- package/src/modules/data/data.core.js +1 -3
- package/src/modules/data/data.js +4601 -4525
- package/src/modules/data/data.routes.js +29 -3
- package/src/modules/mongodb.js +3 -1
- package/src/modules/user.js +12 -1
- package/src/modules/workflow.js +198 -117
- package/src/packs.js +1015 -9
- package/src/services/index.js +11 -0
- package/src/services/stripe.js +141 -0
- package/test/data.integration.test.js +66 -3
- package/test/workflow.actions.integration.test.js +474 -0
- package/test/workflow.integration.test.js +1 -1
package/README.md
CHANGED
|
@@ -84,6 +84,8 @@ MONGO_DB_URL=mongodb://127.0.0.1:27017
|
|
|
84
84
|
| JWT_SECRET | Secret key for signing JWT authentication tokens. | a_long_random_secret_string |
|
|
85
85
|
| OPENAI_API_KEY | Your optional OpenAI API key for AI features. | sk-xxxxxxxxxxxxxxxxxxxx |
|
|
86
86
|
| GOOGLE_API_KEY | Your optional Google (Gemini) API key for AI features. | AIzaSyxxxxxxxxxxxxxxxxxxxx |
|
|
87
|
+
| DEEPSEEK_API_KEY | Your optional DeepSeek API key for AI features. | AIzaSyxxxxxxxxxxxxxxxxxxxx |
|
|
88
|
+
| ANTHROPIC_API_KEY | Your optional Anthropic API key for AI features. | AIzaSyxxxxxxxxxxxxxxxxxxxx |
|
|
87
89
|
| AWS_ACCESS_KEY_ID | AWS access key for S3 storage (files, backups). Keep empty to disable | AKIAIOSFODNN7EXAMPLE |
|
|
88
90
|
| AWS_SECRET_ACCESS_KEY | AWS secret access key. | wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY | |
|
|
89
91
|
| AWS_REGION | Region for your S3 bucket. | eu-west-3 | |
|
|
@@ -489,15 +491,49 @@ await loadFromDump(currentUser, { modelsOnly: false });
|
|
|
489
491
|
|
|
490
492
|
### installPack(packId, user, lang)
|
|
491
493
|
|
|
492
|
-
> Installs a
|
|
494
|
+
> Installs a data pack.
|
|
493
495
|
|
|
494
496
|
Example:
|
|
495
497
|
|
|
498
|
+
```javascript
|
|
499
|
+
const result = await installPack([
|
|
500
|
+
{
|
|
501
|
+
"name": "My custom pack",
|
|
502
|
+
"description": "Markdown **description** of the pack",
|
|
503
|
+
"tags": ["customPack", "tag1", "tag2"],
|
|
504
|
+
"models": [
|
|
505
|
+
"env", // default model
|
|
506
|
+
{
|
|
507
|
+
"name": "post",
|
|
508
|
+
"description": "Defines a post",
|
|
509
|
+
"fields": [
|
|
510
|
+
{"name": "subject", "type": "string", "required": true},
|
|
511
|
+
]
|
|
512
|
+
}, // or custom
|
|
513
|
+
],
|
|
514
|
+
"data": {
|
|
515
|
+
"all": { // all languages installed data
|
|
516
|
+
"post": [
|
|
517
|
+
{"subject": "My pack first data"}
|
|
518
|
+
]
|
|
519
|
+
},
|
|
520
|
+
"en": { // English specific installed data
|
|
521
|
+
"post": [
|
|
522
|
+
{"subject": "My english first post"}
|
|
523
|
+
]
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
], user, "en");
|
|
528
|
+
// Returns installation summary
|
|
529
|
+
```
|
|
530
|
+
|
|
496
531
|
```javascript
|
|
497
532
|
const result = await installPack("61d1f1a9e3f1a9e3f1a9e3f1", user, "en");
|
|
498
533
|
// Returns installation summary
|
|
499
534
|
```
|
|
500
535
|
|
|
536
|
+
> You can also open the pack gallery to see the JSON structure of each pack, before installing them.
|
|
501
537
|
|
|
502
538
|
---
|
|
503
539
|
|
|
@@ -538,7 +574,7 @@ A workflow is composed of two main parts: **Triggers** and **Actions**.
|
|
|
538
574
|
- **CreateData**: Create a new document in any model.
|
|
539
575
|
- **UpdateData**: Modify one or more existing documents that match a filter.
|
|
540
576
|
- **SendEmail**: Send a transactional email using dynamic data from the trigger.
|
|
541
|
-
- **
|
|
577
|
+
- **HttpRequest**: Make an HTTP request (GET, POST, etc.) to an external service or API.
|
|
542
578
|
- **ExecuteScript**: Run a custom JavaScript snippet for complex logic, data transformation, or conditional branching.
|
|
543
579
|
- **GenerateAIContent**: Use an integrated AI provider (like OpenAI or Gemini) to generate text, summarize content, or make decisions.
|
|
544
580
|
- **Wait**: Pause the workflow for a specific duration before continuing to the next step
|