@goatlab/fluent-formio 0.7.0 → 0.7.2
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 +25 -36
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @goatlab/fluent-formio
|
|
2
2
|
|
|
3
|
-
A fluent query interface connector for Form.io that provides a consistent API for CRUD operations with Form.io data sources.
|
|
3
|
+
A fluent query interface connector for Form.io that provides a type-safe, consistent API for CRUD operations with Form.io data sources.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -17,50 +17,39 @@ pnpm add @goatlab/fluent-formio
|
|
|
17
17
|
```typescript
|
|
18
18
|
import { FormioConnector } from '@goatlab/fluent-formio'
|
|
19
19
|
|
|
20
|
-
// Define your entity types
|
|
21
|
-
interface User {
|
|
22
|
-
id?: string
|
|
23
|
-
name: string
|
|
24
|
-
email: string
|
|
25
|
-
age: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
20
|
// Create a connector instance
|
|
29
|
-
const userConnector = new FormioConnector
|
|
30
|
-
baseEndPoint: '
|
|
31
|
-
token: 'your-formio-token'
|
|
21
|
+
const userConnector = new FormioConnector({
|
|
22
|
+
baseEndPoint: 'https://api.form.io/project/users',
|
|
23
|
+
token: 'your-formio-jwt-token'
|
|
32
24
|
})
|
|
33
25
|
|
|
34
|
-
//
|
|
26
|
+
// Perform CRUD operations
|
|
35
27
|
const user = await userConnector.insert({
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
data: {
|
|
29
|
+
name: 'John Doe',
|
|
30
|
+
email: 'john@example.com'
|
|
31
|
+
}
|
|
39
32
|
})
|
|
40
33
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
where: { age: { greaterOrEqualThan: 18 } },
|
|
44
|
-
orderBy: [{ age: 'desc' }],
|
|
34
|
+
const users = await userConnector.findMany({
|
|
35
|
+
where: { 'data.status': 'active' },
|
|
45
36
|
limit: 10
|
|
46
37
|
})
|
|
47
|
-
|
|
48
|
-
// Find by ID
|
|
49
|
-
const foundUser = await userConnector.findById(user.id)
|
|
50
|
-
|
|
51
|
-
// Update a record
|
|
52
|
-
await userConnector.updateById(user.id, {
|
|
53
|
-
age: 31
|
|
54
|
-
})
|
|
55
38
|
```
|
|
56
39
|
|
|
57
40
|
## Key Features
|
|
58
41
|
|
|
59
|
-
- **
|
|
60
|
-
- **
|
|
61
|
-
- **
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **Advanced
|
|
65
|
-
|
|
66
|
-
|
|
42
|
+
- **Form.io REST API Integration** - Full support for Form.io submission and form APIs
|
|
43
|
+
- **Type-Safe Queries** - TypeScript support with auto-completion
|
|
44
|
+
- **Fluent Query Builder** - Chainable query methods for complex operations
|
|
45
|
+
- **Built-in Mock Storage** - In-memory implementation for testing and development
|
|
46
|
+
- **Form.io Authentication** - JWT token and API key support
|
|
47
|
+
- **Advanced Filtering** - Support for nested properties, date ranges, and complex conditions
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
For comprehensive documentation, see the [Form.io Connector Guide](https://docs.goatlab.io/connectors/formio).
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goatlab/fluent-formio",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Readable query Interface & API generator for TS and Node",
|
|
5
5
|
"homepage": "https://docs.goatlab.io",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"author": "ignacio.cabrera@goatlab.io",
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@goatlab/
|
|
23
|
-
"@goatlab/
|
|
22
|
+
"@goatlab/js-utils": "0.9.0",
|
|
23
|
+
"@goatlab/fluent": "0.8.2"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^17.0.23",
|