Версия: 2.0.0
Дата: 2025-11-10
Для каждой Entity автоматически создаются:
GET /api/contacts - List
POST /api/contacts - Create
GET /api/contacts/:id - Read
PUT /api/contacts/:id - Update
DELETE /api/contacts/:id - Delete
GET /api/contacts?filter={
"status": "active",
"email": {"$regex": ".*@gmail.com"},
"created_at": {"$days_ago": 30}
}
Операторы:
- Comparison: $gt, $lt, $in, $between
- String: $regex, $contains, $startswith
- Date: $date_gt, $days_ago, $this_month
- Logical: $and, $or, $not
GET /api/contacts?sort=-created_at&limit=50&offset=100
from cifra.events import event_bus
await event_bus.emit('entity.Contact.created', {
'id': contact.id,
'email': contact.email
})
from cifra.events import subscribe
@subscribe('entity.Contact.created')
async def send_welcome_email(event):
contact = event.payload
await email_service.send(
to=contact['email'],
template='welcome'
)
webhooks:
stripe:
url: /api/webhooks/stripe
events: [payment.success, payment.failed]
github:
url: /api/webhooks/github
events: [push, pull_request]
query {
contacts(filter: {status: "active"}) {
id
name
email
company {
name
}
}
}
Следующий документ: UI_AND_THEMES.md →