revoltchat / api Goto Github PK
View Code? Open in Web Editor NEWTypescript typings and OpenAPI v3 generator for the Revolt API.
Home Page: https://developers.revolt.chat/api/
License: MIT License
Typescript typings and OpenAPI v3 generator for the Revolt API.
Home Page: https://developers.revolt.chat/api/
License: MIT License
At the moment, Search for Messages (POST channels/{target}/search
) utilizes nearly identical parameters to Fetch Messages (GET channels/{target}/messages
), but the former uses a JSON request body whereas the latter uses query parameters, which in my personal opinion is a worse way to build requests especially with as many parameters as the methods allow.
Would it be possible to make both endpoints use the same request body type (specifically a JSON request body instead of query parameters) for consistency? This would obviously be a breaking change for clients and API wrappers which depend on this functionality, but I think it would be better to get that over with sooner rather than later.
There are multiple places in the API spec where an object representing a role's permissions (allowed and denied) is expressed, but I've noticed an inconsistency: Sometimes the fields are allow
and deny
(example: Set Role Permission), and sometimes they are a
and d
(example: Create Role). Could this be fixed up and unified in one way or another? It would make some API wrappers' lives easier not needing to include special JSON deserialization logic to handle the same model with differing field names, or having to include redundant model code. ๐
The other status codes aren't documented, which can be there in case a request fails, like if we try to send a message to a channel where we don't have permissions.
It would be a great idea to create one more property in the User interface, where it returns a Boolean value to check if the user is a bot.
export interface User {
isBot: Boolean;
}
So it would be simpler to identify the user type directly by the revolt.js
bookstore.
My Revolt Profile: TiaGoiNsaNy
On this page:
https://developers.revolt.chat/api/#tag/Session/operation/login_login
On the first request sample, where it shows what to do to fufil mfa as copied here:
{
"mfa_ticket": "string",
"mfa_response": {
"password": "string"
},
"friendly_name": "string"
}
It'd throw error code 400 (Bad Request)
Turns out when inspecting network traffic from Revite, where it'd say password, it actually uses a field named "totp_code", which did work as intended and generated a new login session.
https://api.revolt.chat/users/{target} doesnt return the users background banner, only your own (the token used to make the api request).
Solution (but still bad):
make ANOTHER request to https://api.revolt.chat/users/{target}/profile and get the background there.
**pls use the method used in the https://api.revolt.chat/users/{target}/profile route and integrate it into https://api.revolt.chat/users/{target} if possible. **
For example, to prevent moderators from being blocked by users who are trying to ignore them / being disruptive.
Alternatively, this could be applied to only people with platform moderation powers.
Limit KaTeX, tables, headings behind feature flag for channels.
This could be useful for cross-posting and IoT-related use cases. Custom route management should be permissions-gated to prevent spamming by randomly creating message routes.
The semantics should be as follows: server-wide permissions allow you to create, alter and drop a message route targeting any channel, while per-guild permission only allows you to do so while requiring you to have either:
A routing rule shall consist of eight elements:
A routing rule can only be deleted in either of the following cases:
There seem to be some typing issues - these are causing issues when trying to compile other projects:
https://autumn.revolt.chat/attachments/oKmI5u9BuEb7RbVOm03cVTMgdOHLhHCNcfpuUxrKlA/image.png
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.