Document the admin real-time channel (POST /_/realtime) and X-CWA-Client-Id
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 67/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design, documentation
Hướng nghiên cứu
Start in the bundle's content/4.api/ documentation and identify the endpoint and writer sections to update; check the linked bundle issue and PR for implementation details. Then find the template deployment guidance for Nelmio allow_headers and Mercure history settings. Done when the docs cover the endpoint behavior, payload, limits, writer echo, configuration, and deployment settings listed in this issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The bundle is adding an admin real-time channel (api-components-bundle#559, PR #560). Please document the following.
Bundle (content/4.api/)
- Endpoint:
POST /_/realtime(/_api/_/realtimeunder the template).ROLE_ADMIN.- Body:
{clientId, event, iri?, data?}, 16 KB at most. - Responds 202, and stores nothing.
- Content types:
- JSON accepts any event.
text/plain(navigator.sendBeacon) is accepted only forevent: "presence"withdata.state: "left".- Anything else is 415.
- A cross-site request (
Sec-Fetch-Site) is 403.
- Payload, published privately on one site-wide topic that only admins' subscriber cookies grant:
{"@type": "CwaRealtimeEvent", "v": 1, clientId, user: {id, name}, event, iri, data, sentAt, expiresAt} - Rate limits:
- 20 burst / 10 a second per user and
clientId. - 60 burst / 30 a second per user across all their clients.
- Above either: 429 with
Retry-After. - The limiter pool
silverback.api_components.realtime.rate_limiter_cacheusescache.appby default, so the limits apply per pod. Point it at a shared adapter inframework.cache.poolsto make them exact.
- 20 burst / 10 a second per user and
- Publishing: bounded at 1 s. A failed or timed-out publish is logged and still answers 202.
- Config:
silverback_api_components.realtime.enabled(defaulttrue). Whenfalse, the endpoint is a 404 and no cookie grants the topic. - Writer echo: a write carrying
X-CWA-Client-Idgets_metadata.lastWrite: {clientId, userId, at}in the writer's response and in the private?draft=1update.atis server time, RFC 3339 with milliseconds.- Use
at, notmodifiedAt, to order draft updates.
Deployment
- The front end must be allowed to send
X-CWA-Client-Id. In the template, add it to nelmio'sallow_headers. The bundle has no Flex recipe yet (#259). - Presence events stay in the Mercure hub's replay history, so mention the hub's history size and retention settings.
- Ngôn ngữ chính
- TypeScript
- Star
- 0
- Fork
- 0
- Merge trung bình
- 1 giờ 20 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của components-web-app/docs
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
components-web-app/docs#290 ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
components-web-app/docs#289 · 2 bình luận ·
-
documentation
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 43/100
components-web-app/docs#285 ·
-
documentation
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
components-web-app/docs#284 ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
components-web-app/docs#237 · 2 bình luận ·
Tất cả issue của components-web-app/docs
Issue tương tự
-
ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
xavxyz/bei-shan-lin-shui#57 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
最近文档这个弹窗,左右宽度没有最小宽度限制Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
siyuan-note/siyuan#20799 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày