Commit Graph

1510 Commits

Author SHA1 Message Date
kozabrada123 04f5c9082d
Merge 170f79bbd1 into ec9541f38e 2024-08-10 09:35:46 +02:00
kozabrada123 170f79bbd1 feat: add authorize_connection
Also adds: src/types/entities/connection.rs, Connection and PublicConnection,
src/api/users/connections.rs
2024-08-10 11:34:56 +02:00
kozabrada123 6c6a87ce5b feat: add #545 and #546
Adds the RECENT_MENTION_DELETE and USER_NOTE_UPDATE gateway events.

The events can be accessed at:
message.recent_mention_delete
&
user.note_update
2024-08-09 11:23:38 +02:00
kozabrada123 1dfbd216a4 feat: user notes endpoints
Adds: get_user_notes, get_user_note, set_user_note
2024-08-09 11:10:25 +02:00
kozabrada123 87aad461fd feat: add get_user_harvest & create_user_harvest
Also adds /types/entities/harvest.rs, types for Harvest
2024-08-09 10:24:38 +02:00
kozabrada123 9d847906be feat: recent_mentions endpoints
Adds GET /users/@me/mentions and DELETE /users/@me/mentions/{message.id}
2024-08-09 09:29:48 +02:00
kozabrada123 fa70c55944 fix: rustdoc lints 2024-08-09 09:11:20 +02:00
kozabrada123 754c212b39 Merge dev into user-routes 2024-08-09 08:55:38 +02:00
kozabrada123 ec9541f38e
CI/CD: add cargo-doc job (#544)
* CI/CD: add cargo-doc job

* fix: make it rustdoc, totally not clippy
2024-08-09 08:53:43 +02:00
kozabrada123 7683ce49a3 feat: add create_pomelo_migration 2024-08-08 19:14:39 +02:00
kozabrada123 926f89e1cf feat: add get_pomelo_suggestions and get_pomelo_eligibility 2024-08-08 09:57:23 +02:00
kozabrada123 80c99753c4 chore: add integration expire behavior 2024-08-08 09:09:46 +02:00
kozabrada123 1fa84b4b63 feat!: add get_user_profile query string schema 2024-08-08 08:58:57 +02:00
kozabrada123 e6a4cc30a6 feat!: add discriminator parameter to get_user_by_username 2024-08-08 08:37:08 +02:00
Flori e4dd31ef78
sqlx related improvements (#542)
* Bump sqlx to 0.8.0

* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any

* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any

* Modify chorus_macros::SqlxBitflagDerive to use sqlx::Any over sqlx::MySql (broken!)

* Fix: `cannot infer type for type parameter `DB` declared on the trait...`

* Change remaining impls of sqlx traits for MySql to sqlx::Any

* Alter chorus_macros to correctly derive SqlxBitFlag for sqlx::Any

* rustc/clippy>=v1.80.0: Do not warn when encountering cfg(tarpaulin_include)

* Port compare_* methods to sqlx v0.8.0
2024-08-04 13:08:56 +02:00
Flori ab82a5d49a
Update MSRV (#540)
* Update msrv
2024-08-02 21:12:38 +02:00
kozabrada123 0a1c51dddd feat: modify email and verify email endpoints 2024-07-29 10:42:14 +02:00
kozabrada123 5d0a65a9a9 feat: delete and disable user endpoints 2024-07-29 09:23:09 +02:00
kozabrada123 62d48d61fe feat: add modify user profile 2024-07-29 08:50:10 +02:00
Flori 2bd9fbaa9c
bump versions of packages to latest compatible versions (#536) 2024-07-28 12:35:26 +02:00
bitfl0wer f2f45b4b86
bump versions of packages to latest compatible versions 2024-07-28 12:28:56 +02:00
kozabrada123 20bdb3247a api: re-do a large part of the users api 2024-07-28 12:20:27 +02:00
Flori 582173234f
Manually implement std::default::Default for GatewayHeartbeat and Gat… (#535)
Manually implement std::default::Default for GatewayHeartbeat and
GatewayHeartbeatAck with the correct opcodes.
2024-07-28 11:49:49 +02:00
kozabrada123 7db5015c07 feat: Add UserProfile and other types 2024-07-28 11:42:26 +02:00
bitfl0wer 7bba7c6fcb
Manually implement std::default::Default for GatewayHeartbeat and GatewayHeartbeatAck 2024-07-27 15:31:47 +02:00
Flori 274b9ab0ca
More accurate "GatewayHello::default()" (#534)
Replaces the derived `std::default::Default` with

```rs
impl std::default::Default for GatewayHello {
    fn default() -> Self {
        Self {
            // "HELLO" opcode is 10
            op: 10,
            d: Default::default(),
        }
    }
}

impl std::default::Default for HelloData {
    fn default() -> Self {
        Self {
            // Discord docs mention 45000 seconds - discord.sex mentions 41250. Defaulting to 45s
            heartbeat_interval: 45000,
        }
    }
}
```
2024-07-26 23:37:28 +02:00
bitfl0wer d4f6a7e98a
More accurate "GatewayHello::default()" 2024-07-26 23:28:23 +02:00
Flori 537b0253bb
Theme colors patch (#533)
Related to #523, changes `theme_colors` property on `User` and
`PublicUser` to be of type `(u32, u32)`
2024-07-26 17:48:40 +02:00
bitfl0wer 9dbb5ea77b
impl sqlx::Type for ThemeColors 2024-07-26 17:40:42 +02:00
bitfl0wer ffcf15d058
Custom ThemeColors type with sqlx::Encode and sqlx::Decode impls 2024-07-26 17:30:43 +02:00
bitfl0wer 111a8c42f5
change theme_colors from Vec<u32> to (u32, u32) 2024-07-26 14:54:55 +02:00
kozabrada123 4292ab88e9
Fix #525 (pr #532) 2024-07-26 10:02:11 +02:00
kozabrada123 a27b488f61
Publically reexport Subscriber as Observer (#530)
Fixes the compile errors in the `voice_simple` example, updates the docs
in the `gateway_observers` example and adds a public reexport of
`Subscriber` as `Observer`, to make development easier and introduce
less breaking changes to our public api

to reduce the external dependencies needed for development with
`chorus`, we could also add some other reexports, potentially
`async_trait::async_trait`
2024-07-25 11:49:44 +02:00
kozabrada123 d829537713 remove cargo lock from example 2024-07-25 11:31:16 +02:00
kozabrada123 b9bc37fcd4 Readd Observer trait as reexport 2024-07-25 11:29:35 +02:00
kozabrada123 832576dbf4 Update documentation in gateway_observers example 2024-07-25 11:28:22 +02:00
kozabrada123 539460a552 Fix voice_simple example 2024-07-25 11:27:30 +02:00
bitfl0wer feb2b1b64c
Bump browser_version according to https://www.useragents.me/#most-common-desktop-useragents 2024-07-24 21:55:10 +02:00
Flori e8469c8e4f
Use cargo nextest (#529)
This PR switches the `linux` job from `cargo test` to `cargo nextest
run` for > 50% time reduction in the test execution step of the CI
pipeline. Also, the "check common non default feature configurations"
step has been moved from the `linux` job to it's own job, to parallelize
the CI pipeline further and reduce the time that CI needs to run to
completion.
2024-07-24 16:24:26 +02:00
bitfl0wer d15dfc302d
Revert: nextest on wasm 2024-07-24 16:17:00 +02:00
bitfl0wer 31509b9945
forgor installing nextest 2024-07-24 16:12:06 +02:00
bitfl0wer f32b3060cf
Cargo nextest on wasm, Parallelize "Check common non-default feat. cfg." 2024-07-24 16:09:33 +02:00
bitfl0wer cc7ed62cf2
Merge branch 'dev' into nextest 2024-07-24 15:59:21 +02:00
bitfl0wer 7bb35e5ed8
Increase limit integer size to match spacebars' possibilities 2024-07-24 15:57:12 +02:00
bitfl0wer f0fc6eab4d
Fix testcase that relied on false behavior implemented by older spacebar servers 2024-07-24 15:55:49 +02:00
bitfl0wer dd85a7de17
Fix/Correct UnavailableGuild object 2024-07-24 15:55:29 +02:00
bitfl0wer 6bc6651e80
Remove redundant "build" step
I mean the bloody thing already gets built with "cargo test", so...
2024-07-24 14:06:10 +02:00
bitfl0wer 0bfab58f2f
Use cargo nextest 2024-07-24 14:00:40 +02:00
bitfl0wer 6cd3c1081b
Use cargo nextest 2024-07-24 13:58:19 +02:00
bitfl0wer 7a2666bde2
Update CONTRIBUTING.md 2024-07-24 13:37:07 +02:00